@@ -141,12 +141,12 @@ const jsxOptionMap = new Map(Object.entries({
141141export const inverseJsxOptionMap : Map < string , string > = new Map ( mapIterator ( jsxOptionMap . entries ( ) , ( [ key , value ] : [ string , JsxEmit ] ) => [ "" + value , key ] as const ) ) ;
142142
143143// NOTE: The order here is important to default lib ordering as entries will have the same
144- // order in the generated program (see `getDefaultLibPriority ` in program.ts). This
144+ // order in the generated program (see `getDefaultLibFilePriority ` in program.ts). This
145145// order also affects overload resolution when a type declared in one lib is
146146// augmented in another lib.
147147// NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
148148// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
149- // `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts,
149+ // `ScriptTargetFeatures`, `CommandLineOptionOfCustomType`, transformers/esnext.ts, compiler/commandLineParser.ts,
150150// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.
151151const libEntries : [ string , string ] [ ] = [
152152 // JavaScript only
@@ -163,6 +163,7 @@ const libEntries: [string, string][] = [
163163 [ "es2022" , "lib.es2022.d.ts" ] ,
164164 [ "es2023" , "lib.es2023.d.ts" ] ,
165165 [ "es2024" , "lib.es2024.d.ts" ] ,
166+ [ "es2025" , "lib.es2025.d.ts" ] ,
166167 [ "esnext" , "lib.esnext.d.ts" ] ,
167168 // Host only
168169 [ "dom" , "lib.dom.d.ts" ] ,
@@ -173,7 +174,7 @@ const libEntries: [string, string][] = [
173174 [ "webworker.iterable" , "lib.webworker.iterable.d.ts" ] ,
174175 [ "webworker.asynciterable" , "lib.webworker.asynciterable.d.ts" ] ,
175176 [ "scripthost" , "lib.scripthost.d.ts" ] ,
176- // ES2015 Or ESNext By-feature options
177+ // ES2015 and later By-feature options
177178 [ "es2015.core" , "lib.es2015.core.d.ts" ] ,
178179 [ "es2015.collection" , "lib.es2015.collection.d.ts" ] ,
179180 [ "es2015.generator" , "lib.es2015.generator.d.ts" ] ,
@@ -230,27 +231,33 @@ const libEntries: [string, string][] = [
230231 [ "es2024.regexp" , "lib.es2024.regexp.d.ts" ] ,
231232 [ "es2024.sharedmemory" , "lib.es2024.sharedmemory.d.ts" ] ,
232233 [ "es2024.string" , "lib.es2024.string.d.ts" ] ,
233- [ "esnext.array" , "lib.es2023.array.d.ts" ] ,
234- [ "esnext.collection" , "lib.esnext.collection.d.ts" ] ,
235- [ "esnext.symbol" , "lib.es2019.symbol.d.ts" ] ,
234+ [ "es2025.collection" , "lib.es2025.collection.d.ts" ] ,
235+ [ "es2025.float16" , "lib.es2025.float16.d.ts" ] ,
236+ [ "es2025.intl" , "lib.es2025.intl.d.ts" ] ,
237+ [ "es2025.iterator" , "lib.es2025.iterator.d.ts" ] ,
238+ [ "es2025.promise" , "lib.es2025.promise.d.ts" ] ,
239+ [ "es2025.regexp" , "lib.es2025.regexp.d.ts" ] ,
240+ // Fallback for backward compatibility
236241 [ "esnext.asynciterable" , "lib.es2018.asynciterable.d.ts" ] ,
237- [ "esnext.intl" , "lib.esnext.intl.d.ts" ] ,
238- [ "esnext.disposable" , "lib.esnext.disposable.d.ts" ] ,
242+ [ "esnext.symbol" , "lib.es2019.symbol.d.ts" ] ,
239243 [ "esnext.bigint" , "lib.es2020.bigint.d.ts" ] ,
240- [ "esnext.string" , "lib.es2022.string.d.ts" ] ,
241- [ "esnext.promise" , "lib.es2024.promise.d.ts" ] ,
242244 [ "esnext.weakref" , "lib.es2021.weakref.d.ts" ] ,
243- [ "esnext.decorators" , "lib.esnext.decorators.d.ts" ] ,
244245 [ "esnext.object" , "lib.es2024.object.d.ts" ] ,
245- [ "esnext.array" , "lib.esnext.array.d.ts" ] ,
246246 [ "esnext.regexp" , "lib.es2024.regexp.d.ts" ] ,
247247 [ "esnext.string" , "lib.es2024.string.d.ts" ] ,
248- [ "esnext.iterator" , "lib.esnext.iterator.d.ts" ] ,
249- [ "esnext.promise" , "lib.esnext.promise.d.ts" ] ,
250- [ "esnext.float16" , "lib.esnext.float16.d.ts" ] ,
251- [ "esnext.typedarrays" , "lib.esnext.typedarrays.d.ts" ] ,
248+ [ "esnext.collection" , "lib.es2025.collection.d.ts" ] ,
249+ [ "esnext.float16" , "lib.es2025.float16.d.ts" ] ,
250+ [ "esnext.iterator" , "lib.es2025.iterator.d.ts" ] ,
251+ [ "esnext.promise" , "lib.es2025.promise.d.ts" ] ,
252+ // ESNext By-feature options
253+ [ "esnext.array" , "lib.esnext.array.d.ts" ] ,
254+ [ "esnext.decorators" , "lib.esnext.decorators.d.ts" ] ,
255+ [ "esnext.disposable" , "lib.esnext.disposable.d.ts" ] ,
252256 [ "esnext.error" , "lib.esnext.error.d.ts" ] ,
257+ [ "esnext.intl" , "lib.esnext.intl.d.ts" ] ,
253258 [ "esnext.sharedmemory" , "lib.esnext.sharedmemory.d.ts" ] ,
259+ [ "esnext.typedarrays" , "lib.esnext.typedarrays.d.ts" ] ,
260+ // Decorators
254261 [ "decorators" , "lib.decorators.d.ts" ] ,
255262 [ "decorators.legacy" , "lib.decorators.legacy.d.ts" ] ,
256263] ;
@@ -555,6 +562,10 @@ export const commonOptionsWithBuild: CommandLineOption[] = [
555562 } ,
556563] ;
557564
565+ // NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
566+ // June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
567+ // `ScriptTargetFeatures`, `CommandLineOptionOfCustomType`, transformers/esnext.ts, compiler/commandLineParser.ts,
568+ // compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.
558569/** @internal */
559570export const targetOptionDeclaration : CommandLineOptionOfCustomType = {
560571 name : "target" ,
@@ -573,6 +584,7 @@ export const targetOptionDeclaration: CommandLineOptionOfCustomType = {
573584 es2022 : ScriptTarget . ES2022 ,
574585 es2023 : ScriptTarget . ES2023 ,
575586 es2024 : ScriptTarget . ES2024 ,
587+ es2025 : ScriptTarget . ES2025 ,
576588 esnext : ScriptTarget . ESNext ,
577589 } ) ) ,
578590 affectsSourceFile : true ,
0 commit comments