Files
scriptc/tests
Chris Tateandthekevinbrown 19d6736b01 Look up exports whose names start with "__" by their escaped key
TypeScript keys a symbol table entry whose name starts with `__` with an
extra `_` (`__x` is stored as `___x`; `symbolName` removes it). Native ESM
link checking looked an import up by its own spelling, so a program that
imports such an export compiled to Node's startup SyntaxError:

    // dep.ts
    export const __x = 1;
    // main.ts
    import { __x } from "./dep.ts"; // The requested module './dep.ts'
                                    // does not provide an export named '__x'

`escapedSymbolName`, the inverse of `symbolName`, gives a name's table key.
Link checking, external type lookups, CommonJS export lookups and the
`this` check of ES module exports now look names up through it. `Object.keys`
over a module namespace skipped every key starting with `__` to drop
TypeScript's internal names, so it also dropped these exports; it now
skips only internal names and lists exports by their own names.

Closes #1582.

Co-authored-by: thekevinbrown <1531750+thekevinbrown@users.noreply.github.com>
2026-10-23 15:04:56 -05:00
..
2026-10-23 07:50:09 -05:00
…