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
This commit is contained in:
Nathan Shively-Sanders 2019-12-20 09:23:15 -08:00 committed by GitHub
parent 2cc1340a7b
commit 3b7de1a976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12882,7 +12882,7 @@ namespace ts {
case SyntaxKind.NeverKeyword:
return neverType;
case SyntaxKind.ObjectKeyword:
return node.flags & NodeFlags.JavaScriptFile ? anyType : nonPrimitiveType;
return node.flags & NodeFlags.JavaScriptFile && !noImplicitAny ? anyType : nonPrimitiveType;
case SyntaxKind.ThisType:
case SyntaxKind.ThisKeyword:
return getTypeFromThisTypeNode(node as ThisExpression | ThisTypeNode);