Skip to content

[TS] Execute default export expressions during module initialization - #394

Merged
CaelmBleidd merged 9 commits into
neofrom
caelmbleidd/ts-378-export-default
Oct 3, 2026
Merged

CaelmBleidd merged 9 commits into
neofrom
caelmbleidd/ts-378-export-default

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Summary

  • Evaluate export default <expression> in source order in the module %dflt method.
  • Store the result once in the static default field and point export metadata to that snapshot, so later writes to the source variable do not change the default export.
  • Preserve an explicit unsupported diagnostic for bare class/function/enum/namespace declaration identifiers because EtsIR does not yet represent those declarations as standalone values.

Fixes #378.

Checks

  • npm run typecheck
  • npm test (218 TypeScript frontend tests)
  • Focused EtsTsFrontendTest for bundled frontend JSON deserialization and model conversion
  • EtsExportTest (8 tests)
  • Normal checkLicense pre-commit hook

The regression compares the sample's result with TypeScript's CommonJS output in Node (default === 1, after === 10), and separately checks the corresponding EtsIR call, assignment, and source order. The Kotlin integration test checks the production JSON path. No EtsIR runtime execution is claimed.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

  225 files  ±0    225 suites  ±0   16m 1s ⏱️ + 1m 36s
  788 tests +7    776 ✅ +7  12 💤 ±0  0 ❌ ±0 
2 058 runs  +7  2 008 ✅ +7  50 💤 ±0  0 ❌ ±0 

Results for commit 3c62f61. ± Comparison against base commit 873f8e9.

♻️ This comment has been updated with latest results.

@CaelmBleidd
CaelmBleidd marked this pull request as ready for review October 2, 2026 21:18
@CaelmBleidd
CaelmBleidd merged commit 4005477 into neo Oct 3, 2026
7 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.

1 participant