From b33d37201e8f0353f69406d9872955dd4ccb9c34 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:47:25 -0800 Subject: [PATCH] Don't set parent on non-transient symbols in mergeSymbolTable (#61560) --- src/compiler/checker.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bfa81f69646..dfd47912720 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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); });