8000 Gate usage of `--module`/`--moduleResolution` `node12`/`nodenext` on nightly releases · Issue #46454 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

8000
Skip to content
Gate usage of --module/--moduleResolution node12/nodenext on nightly releases #46454
@DanielRosenwasser

Description

@DanielRosenwasser

In #46452 and #46453, we came to the conclusion that the nodenext and node12 settings for module and moduleResolution should not ship in TypeScript 4.5, and should instead be gated on nightly releases.

In a beta/rc/insiders/stable (or really, any non-dev) release

  • tsc should error on this flag combination
  • API users should get a diagnostic in program construction

One possible error message would be:

The '{0}' compiler option can only be set to '{1}' on nightly TypeScript releases. Learn more at: https://www.typescriptlang.org/docs/handbook/nightly-builds.html

another might be

The '{0}' compiler option can only be set to '{1}' on nightly TypeScript releases. Try updating with 'npm install -D typescript@next'.

One thing that's still a little fuzzy - I think .mts/.mjs/.cts/.cjs should be passively allowed in editing; but should they be errors to include within a compilation? Is it possible to make that distinction today?

Metadata

Metadata

Assignees

Labels

CommittedThe team has roadmapped this issueFix AvailableA PR has been opened for this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0