diff --git a/src/vs/base/common/console.ts b/src/vs/base/common/console.ts index ccd30d07a1e..9b49ff985d4 100644 --- a/src/vs/base/common/console.ts +++ b/src/vs/base/common/console.ts @@ -131,7 +131,10 @@ export function log(entry: IRemoteConsoleLog, label: string): void { } // Log it - console[entry.severity].apply(console, consoleArgs); + if (typeof (console as any)[entry.severity] !== 'function') { + throw new Error('Unknown console method'); + } + (console as any)[entry.severity].apply(console, consoleArgs); } function color(color: string): string { diff --git a/src/vs/base/parts/storage/node/storage.ts b/src/vs/base/parts/storage/node/storage.ts index 48e347df1f2..6cebac12c9f 100644 --- a/src/vs/base/parts/storage/node/storage.ts +++ b/src/vs/base/parts/storage/node/storage.ts @@ -237,7 +237,7 @@ export class SQLiteStorageDatabase implements IStorageDatabase { const connection = await this.whenConnected; const row = await this.get(connection, full ? 'PRAGMA integrity_check' : 'PRAGMA quick_check'); - const integrity = full ? row['integrity_check'] : row['quick_check']; + const integrity = full ? (row as any)['integrity_check'] : (row as any)['quick_check']; if (connection.isErroneous) { return `${integrity} (last error: ${connection.lastError})`; diff --git a/src/vs/workbench/contrib/extensions/common/extensionQuery.ts b/src/vs/workbench/contrib/extensions/common/extensionQuery.ts index 25b9c3cf909..445e23db188 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionQuery.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionQuery.ts @@ -29,8 +29,8 @@ export class Query { if (hasSort && command === 'sort' || hasCategory && command === 'category') { return []; } - if (subcommands[command]) { - return subcommands[command].map((subcommand: string) => `@${command}:${subcommand}${subcommand === '' ? '' : ' '}`); + if ((subcommands as any)[command]) { + return (subcommands as any)[command].map((subcommand: string) => `@${command}:${subcommand}${subcommand === '' ? '' : ' '}`); } else { return [`@${command} `]; diff --git a/src/vs/workbench/contrib/quickopen/browser/viewPickerHandler.ts b/src/vs/workbench/contrib/quickopen/browser/viewPickerHandler.ts index b7aa6827dfc..8c11af81604 100644 --- a/src/vs/workbench/contrib/quickopen/browser/viewPickerHandler.ts +++ b/src/vs/workbench/contrib/quickopen/browser/viewPickerHandler.ts @@ -21,6 +21,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { Registry } from 'vs/platform/registry/common/platform'; import { CancellationToken } from 'vs/base/common/cancellation'; +import { IStringDictionary } from 'vs/base/common/collections'; export const VIEW_PICKER_PREFIX = 'view '; @@ -101,7 +102,7 @@ export class ViewPickerHandler extends QuickOpenHandler { return true; }); - const entryToCategory = {}; + const entryToCategory: IStringDictionary = {}; entries.forEach(e => { if (!entryToCategory[e.getLabel()]) { entryToCategory[e.getLabel()] = e.getCategory();