FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add `module: es2022` by saschanaz · Pull Request #44656 · microsoft/TypeScript · GitHub

Add module: es2022 - #44656

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 1 commit into
microsoft:mainfrom
saschanaz:es2022
Sep 30, 2021
Merged

Add module: es2022#44656
Daniel Rosenwasser (DanielRosenwasser) merged 1 commit into
microsoft:mainfrom
saschanaz:es2022

Conversation

Copy link
Copy Markdown
Contributor

Closes #44653

TypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jun 18, 2021
start: 0,
length: 0,
messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.",
messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext'.",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Interesting to see this hasn't failed. I don't think this even runs 🤔

Kagami Sascha Rosylight (saschanaz) commented Jun 18, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

Should this function return ModuleKind.ES2020 and ES2022 following the target version? It seems #33893 missed this, and I wonder this needs to be fixed.

export function getEmitModuleKind(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) {
return typeof compilerOptions.module === "number" ?
compilerOptions.module :
getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS;
}

Copy link
Copy Markdown
Contributor

PR seems kind of outdated.

Kagami Sascha Rosylight (saschanaz) commented Sep 25, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

I'll rebase once anyone reviews this (or a maintainer requests a rebase).

Copy link
Copy Markdown
Member

This is going to look a weeee bit different after a merge since the module: node changes touch many of the same lines, but initially it looks ok.

Simon Tretter (simllll) commented Sep 28, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Next to module: node12, this is another thing I'm really looking forward to. Currently there is no real setting for node 16 environment, see also https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping

Wesley Wigham (weswigham) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This little looks fine to me - Daniel Rosenwasser (@DanielRosenwasser) do we want this in for the beta?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think this seems reasonable.

Copy link
Copy Markdown

What could be the default option for this and the highest version, I guess is none and esnext?

Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add module: es2022

8 participants


Back | FazBrowse Home | New Git URL