Skip to content

Commit 3b7de1a

Browse files
authored
remove JSDOC object->any rewrite for noImplicitAny (#35661)
* remove JSDOC object->any rewrite * reinstate object->any rewrite when noImplicitAny: false * flip boolean right way round
1 parent 2cc1340 commit 3b7de1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12882,7 +12882,7 @@ namespace ts {
1288212882
case SyntaxKind.NeverKeyword:
1288312883
return neverType;
1288412884
case SyntaxKind.ObjectKeyword:
12885-
return node.flags & NodeFlags.JavaScriptFile ? anyType : nonPrimitiveType;
12885+
return node.flags & NodeFlags.JavaScriptFile && !noImplicitAny ? anyType : nonPrimitiveType;
1288612886
case SyntaxKind.ThisType:
1288712887
case SyntaxKind.ThisKeyword:
1288812888
return getTypeFromThisTypeNode(node as ThisExpression | ThisTypeNode);

0 commit comments

Comments
 (0)