follow up on #46880

This commit is contained in:
Johannes Rieken 2018-03-29 15:28:15 +02:00
parent ed51daf955
commit df7ee603cb

View file

@ -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) {