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 2cc1340 commit 3b7de1aCopy full SHA for 3b7de1a
src/compiler/checker.ts
@@ -12882,7 +12882,7 @@ namespace ts {
12882
case SyntaxKind.NeverKeyword:
12883
return neverType;
12884
case SyntaxKind.ObjectKeyword:
12885
- return node.flags & NodeFlags.JavaScriptFile ? anyType : nonPrimitiveType;
+ return node.flags & NodeFlags.JavaScriptFile && !noImplicitAny ? anyType : nonPrimitiveType;
12886
case SyntaxKind.ThisType:
12887
case SyntaxKind.ThisKeyword:
12888
return getTypeFromThisTypeNode(node as ThisExpression | ThisTypeNode);
0 commit comments