mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Report diagnostic on expression name if it exists
This commit is contained in:
parent
359930a677
commit
2c881fd90a
@ -132,7 +132,7 @@ namespace ts {
|
||||
// check that a property access expression exists in there and that it is a handler
|
||||
const returnStatements = getReturnStatementsWithPromiseHandlers(node);
|
||||
if (returnStatements.length > 0) {
|
||||
diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_may_be_converted_to_an_async_function));
|
||||
diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) && !node.name ? node.parent.name : node, Diagnostics.This_may_be_converted_to_an_async_function));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user