-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptDomain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behaviorRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
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
a-tarasyuk, DetachHead and KotlinIsland
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptDomain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behaviorRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone