Skip to content

[TS] Keep ambient globals out of lexical capture lists - #457

Open
CaelmBleidd wants to merge 1 commit into
neofrom
caelmbleidd/ts-ambient-closure-captures
Open

CaelmBleidd wants to merge 1 commit into
neofrom
caelmbleidd/ts-ambient-closure-captures

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

The frontend currently captures names declared in TypeScript declaration files as lexical values. An exported arrow that throws new Error in a conditional body can then trigger a global read when the module creates the closure.

Exclude declaration-file globals when collecting lexical captures. The use of Error stays in the closure body, and real source bindings, including local shadows, retain their lexical capture behavior.

The regression verifies the conditional throw in the lifted body and the capture of a locally shadowed Error. The closure and import suites passed all 34 tests on neo, and the frontend typecheck passed.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

  252 files  ±0    252 suites  ±0   13m 44s ⏱️ - 2m 16s
  911 tests ±0    899 ✅ ±0  12 💤 ±0  0 ❌ ±0 
2 197 runs  ±0  2 145 ✅ ±0  52 💤 ±0  0 ❌ ±0 

Results for commit bfcf34a. ± Comparison against base commit c5ecfe0.

♻️ This comment has been updated with latest results.

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