🔎 Search Terms
- isolatedModules
- enum
- cross module
- export
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
Test on Playground with version 3.9.7 and version 5.2.2, got the same incorrect result.
⏯ Playground Link
Workbench Repro
💻 Code
// @showEmit// @isolatedModules: true// @filename: foo.tsexportenumFoo{A=10}// @filename: index.tsimport{Foo}from"./foo";exportenumBar{B=Foo.A,C}Workbench Repro
🙁 Actual behavior
Please notice the value of Bar.C
import{Foo}from"./foo";exportvarBar;(function(Bar){Bar[Bar["B"]=10]="B";Bar[Bar["C"]=11]="C";})(Bar||(Bar={}));🙂 Expected behavior
Emit a warning or an error, and generate code that does not rely on other imports.
Example:
import{Foo}from"./foo";exportvarBar;(function(Bar){Bar[Bar["B"]=Foo.A]="B";Bar[Bar["C"]=void0]="C";})(Bar||(Bar={}));The Bar.C is void 0, since it cannot be refered.
Additional information about the issue
🔎 Search Terms
🕗 Version & Regression Information
Test on Playground with version 3.9.7 and version 5.2.2, got the same incorrect result.
⏯ Playground Link
Workbench Repro
💻 Code
Workbench Repro
🙁 Actual behavior
Please notice the value of Bar.C
🙂 Expected behavior
Emit a warning or an error, and generate code that does not rely on other imports.
Example:
The Bar.C is void 0, since it cannot be refered.
Additional information about the issue