No error using imports/exports with --module=none and --target=es2015+ #39603
Labels
Breaking Change
Would introduce errors in existing code
Bug
A bug in TypeScript
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
TypeScript Version: 4.0.0-dev.20200713
Search Terms: module none target
Code
Expected behavior:
TS1148 Cannot use imports, exports, or module augmentations when '--module' is 'none'
and emitsexport class Foo {}
Actual behavior:
No error, and emits as CommonJS.
Playground Link: https://www.typescriptlang.org/play/?module=0#code/KYDwDg9gTgLgBAYwDYEMDOa4DEITgbwF8AoIA
Related issues: #39597
The text was updated successfully, but these errors were encountered: