parent
8d1d9bc1b6
commit
c8bd5b211a
1 changed files with 6 additions and 4 deletions
|
@ -310,10 +310,12 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider<TsCodeActi
|
||||||
}
|
}
|
||||||
|
|
||||||
const actions = this.convertApplicableRefactors(response.body, document, rangeOrSelection).filter(action => {
|
const actions = this.convertApplicableRefactors(response.body, document, rangeOrSelection).filter(action => {
|
||||||
// Don't show 'infer return type' refactoring unless it has been explicitly requested
|
if (this.client.apiVersion.lt(API.v430)) {
|
||||||
// https://github.com/microsoft/TypeScript/issues/42993
|
// Don't show 'infer return type' refactoring unless it has been explicitly requested
|
||||||
if (!context.only && action.kind?.value === 'refactor.rewrite.function.returnType') {
|
// https://github.com/microsoft/TypeScript/issues/42993
|
||||||
return false;
|
if (!context.only && action.kind?.value === 'refactor.rewrite.function.returnType') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue