Back to Tsx

Import elision

notes/bun/import-elision.md

4.23.11773 B
Original Source

Import elision

Bun 1.3.14 lowers every non-declare qualified import-equals declaration to a JavaScript local initialized from the qualified property access; the parser does not classify later type-only references before creating that initializer (parser).

The conformance suite runs the tree-shaking-disabled case while elimination, tree-shaking-enabled elimination, and bundled elimination remain todo (tests); Bun therefore has no pinned contract for erasing a type-only qualified alias or its originating import.