-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behavior
Milestone
Description
TypeScript Version: 3.2.2
Search Terms:
ambiguous es6 modules
Code
// asdf.ts
export {};
compile with tsc --module ES6 asdf.ts
Expected behavior:
compiles to something that is obviously a module, e.g. preserves the export {}
.
Actual behavior:
output is an empty file which could be a script instead of a module.
This causes issues in complex build pipelines - e.g. if we then try to put the output through tsc --module amd
, the output differs from if we had only done tsc --module amd
in the first place.
Playground Link: http://www.typescriptlang.org/play/#src=export%20%7B%20%7D%3B
I can't get es6 output in the playground for this
Related Issues: n/a
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behavior