Open
Description
TypeScript Version: 4.0.0-dev.20200713
Search Terms: module none target
Code
// @module: none
// @target: es2015
export class Foo {}
Expected behavior:
TS1148 Cannot use imports, exports, or module augmentations when '--module' is 'none'
and emits export class Foo {}
Actual behavior:
No error, and emits as CommonJS.
Playground Link: https://www.typescriptlang.org/play/?module=0#code/KYDwDg9gTgLgBAYwDYEMDOa4DEITgbwF8AoIA
Related issues: #39597