We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46da667 commit 22cc3a7Copy full SHA for 22cc3a7
src/compiler/checker.ts
@@ -7455,6 +7455,11 @@ module ts {
7455
7456
if (node.body) {
7457
if (!node.type) {
7458
+ // There are some checks that are only performed in getReturnTypeFromBody, that may produce errors
7459
+ // we need. An example is the noImplicitAny errors resulting from widening the return expression
7460
+ // of a function. Because checking of function expression bodies is deferred, there was never an
7461
+ // appropriate time to do this during the main walk of the file (see the comment at the top of
7462
+ // checkFunctionExpressionBodies). So it must be done now.
7463
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
7464
}
7465
0 commit comments