Formatting

This commit is contained in:
Anders Hejlsberg
2026-04-18 18:45:32 -04:00
parent 7d05047a37
commit e0bffe8875

View File

@@ -25312,8 +25312,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// unique AST node.
return (type as TypeReference).node!;
}
if (type.symbol && objectFlags & (ObjectFlags.Instantiated|ObjectFlags.InstantiatedReference) &&
!(objectFlags & ObjectFlags.Anonymous && type.symbol.flags & SymbolFlags.Class)) {
if (
type.symbol && objectFlags & (ObjectFlags.Instantiated | ObjectFlags.InstantiatedReference) &&
!(objectFlags & ObjectFlags.Anonymous && type.symbol.flags & SymbolFlags.Class)
) {
// We track instantiated object types that have a symbol by that symbol (representing the origin of the
// type), but exclude the static side of a class since it shares its symbol with the instance side.
return type.symbol;