We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search Terms: Async, Await, Refactoring, Code Fix, Explicit Type
Code
function f() { return Promise.resolve().then(res => 1); }
Expected behavior: A Code Action: "Convert To Async Function" is offered.
Actual behavior: No Code Actions are available.
This bug is due to using node.type rather than calling checker.getTypeAtLocation() in suggestionDiagnostics addConvertToAsyncFunctionDiagnostics():
checker.getTypeAtLocation()
addConvertToAsyncFunctionDiagnostics()
const functionType = node.type ? checker.getTypeFromTypeNode(node.type) : undefined;
Changing the code to the following fixes this bug, but introduces bugs in the unused variable detection, at least when running tests.
const functionType = checker.getTypeAtLocation(node);
The text was updated successfully, but these errors were encountered:
uniqueiniquity
Successfully merging a pull request may close this issue.
Search Terms:
Async, Await, Refactoring, Code Fix, Explicit Type
Code
Expected behavior:
A Code Action: "Convert To Async Function" is offered.
Actual behavior:
No Code Actions are available.
This bug is due to using node.type rather than calling
checker.getTypeAtLocation()
in suggestionDiagnosticsaddConvertToAsyncFunctionDiagnostics()
:Changing the code to the following fixes this bug, but introduces bugs in the unused variable detection, at least when running tests.
The text was updated successfully, but these errors were encountered: