提交 0dd7c793 编写于 作者: M Matt Bierner

Fixes js/ts quick fixes

Fixes #47002

Use the correct grouping for the not null assertion
上级 e53d0cda
......@@ -110,7 +110,7 @@ class SupportedCodeActionProvider {
public async getFixableDiagnosticsForContext(context: vscode.CodeActionContext): Promise<vscode.Diagnostic[]> {
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<Iterable<vscode.CodeAction>> {
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册