From 81335051b2d1460112905c2bce23c205e7cdd231 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 2 Apr 2018 11:56:32 -0700 Subject: [PATCH] Fixes js/ts quick fixes Fixes #47002 Use the correct grouping for the not null assertion --- .../src/features/quickFixProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/typescript-language-features/src/features/quickFixProvider.ts b/extensions/typescript-language-features/src/features/quickFixProvider.ts index 088e9734ba823..d4197bfeabb52 100644 --- a/extensions/typescript-language-features/src/features/quickFixProvider.ts +++ b/extensions/typescript-language-features/src/features/quickFixProvider.ts @@ -110,7 +110,7 @@ class SupportedCodeActionProvider { public async getFixableDiagnosticsForContext(context: vscode.CodeActionContext): Promise { const supportedActions = await this.supportedCodeActions; - const fixableDiagnostics = DiagnosticsSet.from(context.diagnostics.filter(diagnostic => supportedActions.has(+!diagnostic.code))); + const fixableDiagnostics = DiagnosticsSet.from(context.diagnostics.filter(diagnostic => supportedActions.has(+(diagnostic.code!)))); return Array.from(fixableDiagnostics.values); } @@ -184,7 +184,7 @@ export default class TypeScriptQuickFixProvider implements vscode.CodeActionProv ): Promise> { const args: Proto.CodeFixRequestArgs = { ...typeConverters.Range.toFileRangeRequestArgs(file, diagnostic.range), - errorCodes: [+!diagnostic.code] + errorCodes: [+(diagnostic.code!)] }; const codeFixesResponse = await this.client.execute('getCodeFixes', args, token); if (codeFixesResponse.body) {