Add flag to emit modules in loose mode#6884
Conversation
There was a problem hiding this comment.
What about emitNonStrictModules. "Loose mode" isn't a formally described thing
There was a problem hiding this comment.
I wanted to avoid the double negative
There was a problem hiding this comment.
Coming from babel, "loose mode" means a set of operations are allowed to be performed not-to-spec (so that some corner cases don't function as expected) - TS output (by comparison) is always loose mode.
What about omitUseStrictPrologue or simply omitUseStrict?
There was a problem hiding this comment.
Yes, "loose" would be confusing.
I don't see a double negation with emitNonStrictModules, but Wesley's suggestions are good as well.
| description: Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking | ||
| }, | ||
| { | ||
| name: "emitNonStrictModules", |
There was a problem hiding this comment.
noAutomaticUseStrict or implictUseStrictOnly to accommodate for classes.
|
👍 |
Add flag to emit modules in loose mode
Fix for #6819, adds a new flag
--emitModulesInLooseModeto not emit"use strict"prologue in modules.