Skip to content

Commit

Permalink
Prepare for TS 3.7 conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Roes committed Oct 10, 2019
1 parent e459f40 commit 84c9421
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class DashboardContainerExample extends React.Component<Props, State> {
}

public switchViewMode = () => {
this.setState((prevState: State) => {
this.setState<'viewMode'>((prevState: State) => {
if (!this.container || isErrorEmbeddable<DashboardContainer>(this.container)) {
return prevState;
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/actions/server/actions_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function isWhitelistedHostnameInUri(config: ActionsConfigType, uri: string): boo
tryCatch(() => new URL(uri)),
map(url => url.hostname),
mapNullable(hostname => isWhitelisted(config, hostname)),
getOrElse(() => false)
getOrElse<boolean>(() => false)
);
}

Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/alerting/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { AlertInstance } from './lib';
import { AlertTypeRegistry } from './alert_type_registry';
import { AlertTypeRegistry as OrigAlertTypeRegistry } from './alert_type_registry';
import { PluginSetupContract, PluginStartContract } from './plugin';
import { SavedObjectAttributes, SavedObjectsClientContract } from '../../../../../src/core/server';

Expand Down Expand Up @@ -95,4 +95,4 @@ export interface AlertingPlugin {
start: PluginStartContract;
}

export type AlertTypeRegistry = PublicMethodsOf<AlertTypeRegistry>;
export type AlertTypeRegistry = PublicMethodsOf<OrigAlertTypeRegistry>;
1 change: 1 addition & 0 deletions x-pack/legacy/plugins/infra/types/eui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ declare module '@elastic/eui' {
message?: any;
rowProps?: any;
cellProps?: any;
responsive?: boolean;
};
export const EuiInMemoryTable: React.SFC<EuiInMemoryTableProps>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,7 @@ describe('ReindexActions', () => {
});

describe('runWhileConsumerLocked', () => {
Object.keys(IndexGroup).forEach(typeKey => {
const consumerType = IndexGroup[typeKey as any] as IndexGroup;

Object.entries(IndexGroup).forEach(([typeKey, consumerType]) => {
describe(`IndexConsumerType.${typeKey}`, () => {
it('creates the lock doc if it does not exist and executes callback', async () => {
expect.assertions(3);
Expand Down

0 comments on commit 84c9421

Please sign in to comment.