Parent #938; overall #66. On current origin/main 4c4e11d, an ambient module pkg declares Nested.Box as a class in one declaration fragment and augments it with export namespace Nested.Box { export const extra: 2; } in another. A second ambient module barrel re-exports Nested from pkg; main.ts imports Nested from barrel, reads Nested.Box.extra, and checks its literal type. Installed TypeScript 5.7.3 under --strict --noEmit --skipLibCheck reports exactly TS2322 for the wrong instance literal, TS2322 for the wrong static literal, and TS2345 for the wrong constructor argument. The current Home CLI under equivalent explicit-file options reports the same instance/constructor errors but adds two false TS2339 for both static reads and omits the required static TS2322. Both commands ran serially under HOME_RUN_MAX_MB=3840. The direct pkg import is already covered by #938/#942; the new gap is the barrel route. Likely route: collectAmbientModules builds the merged source value surface, but the re-export fallback routes only the first resolved namespace origin through appendNamespaceValueRoute. Acceptance: preserve the complete exact merged class constructor/instance/static/type surface through named, renamed, star and chained re-exports without partial or any-typed routes; retain collision/ambiguity and unsupported-schema rejection; compare codes, messages and locations with TypeScript; cover Program, streaming and CLI; run unfiltered relevant gates. No source change or full-suite parity is claimed yet.
fix(ts): carry exact ambient class namespace merges through barrel re-exports
#943Fixed and pushed to origin/main in c57880c (4 files; author/committer glennmichael123 gtorregosa@gmail.com; no coauthors). Ambient barrel exports now carry the complete exact source-owned class/namespace surface across named, renamed, star, and chained reexports. For competing ambient stars, the first actual exporting owner wins; dotted augmentation from a different owner no longer leaks in. Unsupported class schemas publish neither the class nor a partial static route. Verification: Program 392/392, tsc_main 67/67, ts_cli 89/89; ts_checker and ts_driver gates green (cached). Rebuilt home-tsc matched installed TypeScript 5.7.3 diagnostic text/code/location on named, renamed, star, chained, pkg-first, and other-first fixtures; only their nonzero exit-code conventions differ. zig fmt --check and git diff --check passed. Parent #938; umbrella #66. This does not claim native Bun test-suite parity because the pinned Bun WebKit artifact is absent on this host.
Sign in to comment on this issue.