Skip to content

Commit

Permalink
tslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Sep 22, 2020
1 parent 9933bdc commit d47b0cd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/plugins/maps_legacy/public/get_service_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

import { lazyLoadMapsLegacyModules } from './lazy_load_bundle';
// @ts-expect-error
import { getMapsLegacyConfig } from './kibana_services';
import { IServiceSettings } from './map/service_settings_types';

Expand All @@ -31,6 +32,7 @@ export async function getServiceSettings(): Promise<IServiceSettings> {
loadPromise = new Promise(async (resolve) => {
const modules = await lazyLoadMapsLegacyModules();
const config = getMapsLegacyConfig();
// @ts-expect-error
resolve(new modules.ServiceSettings(config, config.tilemap));
});
return loadPromise;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/tile_map/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface TileMapVisualizationDependencies {
getZoomPrecision: any;
getPrecision: any;
BaseMapsVisualization: any;
getServiceSettings: Promise<IServiceSettings>;
getServiceSettings: () => Promise<IServiceSettings>;
}

/** @internal */
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/vis_type_vega/public/data_model/vega_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class VegaParser {
containerDir?: ControlsLocation | ControlsDirection;
controlsDir?: ControlsLocation;
searchAPI: SearchAPI;
getServiceSettings: () => Promse<IServiceSettings>;
getServiceSettings: () => Promise<IServiceSettings>;
filters: Bool;
timeCache: TimeCache;

Expand All @@ -89,7 +89,7 @@ export class VegaParser {
searchAPI: SearchAPI,
timeCache: TimeCache,
filters: Bool,
getServiceSettings: () => Promse<IServiceSettings>
getServiceSettings: () => Promise<IServiceSettings>
) {
this.spec = spec as VegaSpec;
this.hideWarnings = false;
Expand Down Expand Up @@ -568,7 +568,7 @@ The URL is an identifier only. Kibana and your browser will never access this UR
type = DEFAULT_PARSER;
}

const parser = this._urlParsers[type];
const parser = this._urlParsers![type];
if (parser === undefined) {
throw new Error(
i18n.translate('visTypeVega.vegaParser.notSupportedUrlTypeErrorMessage', {
Expand All @@ -592,7 +592,7 @@ The URL is an identifier only. Kibana and your browser will never access this UR
if (pendingParsers.length > 0) {
// let each parser populate its data in parallel
await Promise.all(
pendingParsers.map((type) => this._urlParsers[type].populateData(pending[type]))
pendingParsers.map((type) => this._urlParsers![type].populateData(pending[type]))
);
}
}
Expand Down

0 comments on commit d47b0cd

Please sign in to comment.