mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 01:37:20 +00:00
making the filtering function synchronous
This commit is contained in:
parent
a86c36c6b0
commit
5285e1d97e
1 changed files with 2 additions and 2 deletions
|
@ -557,7 +557,8 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider<TsCodeActi
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const actions = (await this.convertApplicableRefactors(document, response.body, rangeOrSelection)).filter(async action => {
|
const documentSymbols = await vscode.commands.executeCommand<(vscode.SymbolInformation & vscode.DocumentSymbol)[]>('vscode.executeDocumentSymbolProvider', document.uri);
|
||||||
|
const actions = (await this.convertApplicableRefactors(document, response.body, rangeOrSelection)).filter(action => {
|
||||||
if (this.client.apiVersion.lt(API.v430)) {
|
if (this.client.apiVersion.lt(API.v430)) {
|
||||||
// Don't show 'infer return type' refactoring unless it has been explicitly requested
|
// Don't show 'infer return type' refactoring unless it has been explicitly requested
|
||||||
// https://github.com/microsoft/TypeScript/issues/42993
|
// https://github.com/microsoft/TypeScript/issues/42993
|
||||||
|
@ -566,7 +567,6 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider<TsCodeActi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (action.kind?.value === Move_NewFile.kind.value) {
|
if (action.kind?.value === Move_NewFile.kind.value) {
|
||||||
const documentSymbols = await vscode.commands.executeCommand<(vscode.SymbolInformation & vscode.DocumentSymbol)[]>('vscode.executeDocumentSymbolProvider', document.uri);
|
|
||||||
return MoveToFileCodeAction.shouldIncludeCodeAction(documentSymbols, rangeOrSelection);
|
return MoveToFileCodeAction.shouldIncludeCodeAction(documentSymbols, rangeOrSelection);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue