diff --git a/packages/documentation/copy/en/project-config/Compiler Options.md b/packages/documentation/copy/en/project-config/Compiler Options.md index 9fe309c03ebb..688c1aad5e6e 100644 --- a/packages/documentation/copy/en/project-config/Compiler Options.md +++ b/packages/documentation/copy/en/project-config/Compiler Options.md @@ -846,7 +846,7 @@ tsc app.ts util.ts --target esnext --outfile index.js --module

none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node16, node18, node20, nodenext, or preserve

-

CommonJS if target is ES5; ES6/ES2015 otherwise.

+

ESNext if target is ESNext; ES2022 if target is ES2022 or higher; ES2020 if target is ES2020 or higher; ES2015 if target is ES2015 or higher; CommonJS otherwise.

diff --git a/packages/tsconfig-reference/scripts/tsconfigRules.ts b/packages/tsconfig-reference/scripts/tsconfigRules.ts index e710dea44e0f..3efac4edd55e 100644 --- a/packages/tsconfig-reference/scripts/tsconfigRules.ts +++ b/packages/tsconfig-reference/scripts/tsconfigRules.ts @@ -235,8 +235,11 @@ export const defaultsForOptions = { jsxFactory: "React.createElement", locale: "Platform specific.", module: [ - "`CommonJS` if [`target`](#target) is `ES5`;", - "`ES6`/`ES2015` otherwise.", + "`ESNext` if [`target`](#target) is `ESNext`;", + "`ES2022` if [`target`](#target) is `ES2022` or higher;", + "`ES2020` if [`target`](#target) is `ES2020` or higher;", + "`ES2015` if [`target`](#target) is `ES2015` or higher;", + "`CommonJS` otherwise.", ], moduleResolution: [ "`Node10` if [`module`](#module) is `CommonJS`;",