From 044a5f9206033c7fef2ad4136cacd8f6e28193f4 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Tue, 2 Jul 2019 16:37:17 +0200 Subject: [PATCH] Remove suppressImplicitAnyIndexErrors (#76442) --- src/vs/workbench/api/browser/mainThreadQuickOpen.ts | 8 ++++---- src/vs/workbench/api/common/extHost.protocol.ts | 2 ++ src/vs/workbench/api/common/extHostQuickOpen.ts | 6 +++--- .../workbench/browser/parts/quickinput/quickInputList.ts | 2 +- .../workbench/browser/parts/quickinput/quickInputUtils.ts | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadQuickOpen.ts b/src/vs/workbench/api/browser/mainThreadQuickOpen.ts index a44c01c215bb7..78f8439bf227b 100644 --- a/src/vs/workbench/api/browser/mainThreadQuickOpen.ts +++ b/src/vs/workbench/api/browser/mainThreadQuickOpen.ts @@ -174,13 +174,13 @@ export class MainThreadQuickOpen implements MainThreadQuickOpenShape { params[param].forEach((item: TransferQuickPickItems) => { handlesToItems.set(item.handle, item); }); - input[param] = params[param]; + (input as any)[param] = params[param]; } else if (param === 'activeItems' || param === 'selectedItems') { - input[param] = params[param] + (input as any)[param] = params[param] .filter((handle: number) => handlesToItems.has(handle)) .map((handle: number) => handlesToItems.get(handle)); } else if (param === 'buttons') { - input[param] = params.buttons!.map(button => { + (input as any)[param] = params.buttons!.map(button => { if (button.handle === -1) { return this._quickInputService.backButton; } @@ -195,7 +195,7 @@ export class MainThreadQuickOpen implements MainThreadQuickOpenShape { }; }); } else { - input[param] = params[param]; + (input as any)[param] = params[param]; } } return Promise.resolve(undefined); diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 6b747ffac41e4..b702c64c2dafd 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -425,6 +425,8 @@ export type TransferQuickInput = TransferQuickPick | TransferInputBox; export interface BaseTransferQuickInput { + [key: string]: any; + id: number; type?: 'quickPick' | 'inputBox'; diff --git a/src/vs/workbench/api/common/extHostQuickOpen.ts b/src/vs/workbench/api/common/extHostQuickOpen.ts index f4c9f456c13a3..467b05f5c968b 100644 --- a/src/vs/workbench/api/common/extHostQuickOpen.ts +++ b/src/vs/workbench/api/common/extHostQuickOpen.ts @@ -458,14 +458,14 @@ function getLightIconUri(iconPath: QuickInputButton['iconPath']) { || iconPath instanceof URI) { return getIconUri(iconPath); } - return getIconUri(iconPath['light']); + return getIconUri((iconPath as any).light); } return undefined; } function getDarkIconUri(iconPath: QuickInputButton['iconPath']) { - if (iconPath && !(iconPath instanceof ThemeIcon) && iconPath['dark']) { - return getIconUri(iconPath['dark']); + if (iconPath && !(iconPath instanceof ThemeIcon) && (iconPath as any).dark) { + return getIconUri((iconPath as any).dark); } return undefined; } diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts index 7f77928575270..a3de4f70c0783 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts @@ -456,7 +456,7 @@ export class QuickInputList { what = 'Last'; } - this.list['focus' + what](); + (this.list as any)['focus' + what](); this.list.reveal(this.list.getFocus()[0]); } diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts b/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts index babe94951147e..3ea185f4750ca 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts @@ -8,7 +8,7 @@ import * as dom from 'vs/base/browser/dom'; import { URI } from 'vs/base/common/uri'; import { IdGenerator } from 'vs/base/common/idGenerator'; -const iconPathToClass = {}; +const iconPathToClass: Record = {}; const iconClassGenerator = new IdGenerator('quick-input-button-icon-'); export function getIconClass(iconPath: { dark: URI; light?: URI; } | undefined): string | undefined {