Don't set parent on non-transient symbols in mergeSymbolTable (#61560)

This commit is contained in:
Jake Bailey 2025-12-04 09:47:25 -08:00 committed by GitHub
parent dba6c9b824
commit b33d37201e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2840,7 +2840,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// When merging the module augmentation into a.ts, the symbol for `A` will itself be merged, so its parent
// should be the merged module symbol. But the symbol for `B` has only one declaration, so its parent should
// be the module augmentation symbol, which contains its only declaration.
merged.parent = mergedParent;
if (merged.flags & SymbolFlags.Transient) {
merged.parent = mergedParent;
}
}
target.set(id, merged);
});