Skip to content

test(lexer): cover TypeScript default reexports in extended mode - #137

Merged
BridgeAR merged 2 commits into
mainfrom
BridgeAR/2026-10-27-ts-default-reexports
Nov 23, 2026
Merged

BridgeAR merged 2 commits into
mainfrom
BridgeAR/2026-10-27-ts-default-reexports

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

TypeScript emits default reexports with an __importDefault call inside a getter. Default mode excludes the name because the call falls outside its getter patterns. Extended mode must retain the name even after an exports.bar = void 0 declaration.

Refs: #76

TypeScript emits default reexports with an __importDefault call inside a
getter. Default mode excludes the name because the call falls outside its
getter patterns. Extended mode must retain the name even after an
exports.bar = void 0 declaration.

Refs: #76
Signed-off-by: Ruben Bridgewater <ruben.bridgewater@datadoghq.com>
@BridgeAR
BridgeAR marked this pull request as ready for review October 27, 2026 17:37

@guybedford guybedford left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Optional suggestion: since extended defineProperty takes the name before looking at the descriptor, neither the helper form nor the void 0 predeclaration affects the result. A single test using the verbatim output from #76 might read more clearly than the matrix. Also, if extended mode is the resolution for #76, Fixes instead of Refs would close it.

Signed-off-by: Ruben Bridgewater <ruben.bridgewater@datadoghq.com>
@BridgeAR

Copy link
Copy Markdown
Member Author

Updated. About #76: that seems unrelated to this test and I am hesitant to close it already. Extended mode kind of solves it, but I consider it as a kind of experimental part

@BridgeAR
BridgeAR merged commit 6b750e3 into main Nov 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants