@@ -25297,19 +25297,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2529725297 // instantiations of that type have the same recursion identity. The default recursion identity is the object
2529825298 // identity of the type, meaning that every type is unique. Generally, types with constituents that could circularly
2529925299 // reference the type have a recursion identity that differs from the object identity.
25300- function getRecursionIdentity(type: Type): object {
25301- // Object and array literals are known not to contain recursive references and don't need a recursion identity.
25302- if (type.flags & TypeFlags.Object && !isObjectOrArrayLiteralType(type)) {
25303- if (isArrayType(type)) {
25304- // Array wrappers are common and finite in non-recursive object graphs; track recursion identity through
25305- // the element type instead of the shared global Array symbol to avoid false positives in deep nesting.
25306- return getRecursionIdentity(getTypeArguments(type)[0]);
25307- }
25308- if (getObjectFlags(type) & ObjectFlags.Reference && (type as TypeReference).node) {
25309- // Deferred type references are tracked through their associated AST node. This gives us finer
25310- // granularity than using their associated target because each manifest type reference has a
25311- // unique AST node.
25312- return (type as TypeReference).node!;
25300+ function getRecursionIdentity(type: Type): object {
25301+ // Object and array literals are known not to contain recursive references and don't need a recursion identity.
25302+ if (type.flags & TypeFlags.Object && !isObjectOrArrayLiteralType(type)) {
25303+ if (isArrayType(type)) {
25304+ // Array wrappers are common and finite in non-recursive object graphs; track recursion identity through
25305+ // the element type instead of the shared global Array symbol to avoid false positives in deep nesting.
25306+ return getRecursionIdentity(getTypeArguments(type)[0]);
25307+ }
25308+ if (getObjectFlags(type) & ObjectFlags.Reference && (type as TypeReference).node) {
25309+ // Deferred type references are tracked through their associated AST node. This gives us finer
25310+ // granularity than using their associated target because each manifest type reference has a
25311+ // unique AST node.
25312+ return (type as TypeReference).node!;
2531325313 }
2531425314 if (type.symbol && !(getObjectFlags(type) & ObjectFlags.Anonymous && type.symbol.flags & SymbolFlags.Class)) {
2531525315 // We track object types that have a symbol by that symbol (representing the origin of the type), but
0 commit comments