Skip to content

Commit fefecb3

Browse files
committed
feat: add es2026 as a valid target and lib
1 parent 9a8581c commit fefecb3

536 files changed

Lines changed: 6277 additions & 5196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/typescript/src/enums/scriptTarget.enum.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export enum ScriptTarget {
1010
ES2023 = 10,
1111
ES2024 = 11,
1212
ES2025 = 12,
13+
ES2026 = 13,
1314
ESNext = 99,
1415
JSON = 100,
1516
Latest = ESNext,

packages/typescript/src/enums/scriptTarget.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export var ScriptTarget: any;
1111
ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023";
1212
ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024";
1313
ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025";
14+
ScriptTarget[ScriptTarget["ES2026"] = 13] = "ES2026";
1415
ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext";
1516
ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON";
1617
ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest";

packages/typescript/test/async/api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6451,7 +6451,7 @@ describe("Program - diagnostics", () => {
64516451
...rangeOf(config, `"invalid"`),
64526452
code: 6046,
64536453
category: DiagnosticCategory.Error,
6454-
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'esnext'.",
6454+
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'es2026', 'esnext'.",
64556455
}]);
64566456
}
64576457
finally {

packages/typescript/test/sync/api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6367,7 +6367,7 @@ describe("Program - diagnostics", () => {
63676367
...rangeOf(config, `"invalid"`),
63686368
code: 6046,
63696369
category: DiagnosticCategory.Error,
6370-
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'esnext'.",
6370+
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'es2026', 'esnext'.",
63716371
}]);
63726372
}
63736373
finally {

tsc/internal/bundled/embed_generated.go

Lines changed: 36 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsc/internal/bundled/libs/lib.esnext.array.d.ts renamed to tsc/internal/bundled/libs/lib.es2026.array.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ and limitations under the License.
1616

1717
interface ArrayConstructor {
1818
/**
19-
* Creates an array from an async iterator or iterable object.
20-
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
19+
* Creates an array from an async iterable, iterable, or array-like object.
20+
* @param iterableOrArrayLike An async iterable, iterable, or array-like object to convert to an array.
2121
*/
2222
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
2323

2424
/**
25-
* Creates an array from an async iterator or iterable object.
25+
* Creates an array from an async iterable, iterable, or array-like object.
2626
*
27-
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
28-
* @param mapfn A mapping function to call on every element of itarableOrArrayLike.
29-
* Each return value is awaited before being added to result array.
30-
* @param thisArg Value of 'this' used when executing mapfn.
27+
* @param iterableOrArrayLike An async iterable, iterable, or array-like object to convert to an array.
28+
* @param mapFn A mapping function to call on every element of `iterableOrArrayLike`.
29+
* Each return value is awaited before being added to the result array.
30+
* @param thisArg Value of 'this' used when executing `mapFn`.
3131
*/
3232
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
3333
}

tsc/internal/bundled/libs/lib.esnext.collection.d.ts renamed to tsc/internal/bundled/libs/lib.es2026.collection.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Map<K, V> {
2626
/**
2727
* Returns a specified element from the Map object.
2828
* If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the Map and returned.
29-
* @returns The element associated with the specific key, which will be the newly computed value if no element previously existed.
29+
* @returns The element associated with the specified key, which will be the newly computed value if no element previously existed.
3030
*/
3131
getOrInsertComputed(key: K, callback: (key: K) => V): V;
3232
}
@@ -41,7 +41,7 @@ interface WeakMap<K extends WeakKey, V> {
4141
/**
4242
* Returns a specified element from the WeakMap object.
4343
* If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the WeakMap and returned.
44-
* @returns The element associated with the specific key, which will be the newly computed value if no element previously existed.
44+
* @returns The element associated with the specified key, which will be the newly computed value if no element previously existed.
4545
*/
4646
getOrInsertComputed(key: K, callback: (key: K) => V): V;
4747
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABILITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
/// <reference lib="es2025" />
18+
/// <reference lib="es2026.array" />
19+
/// <reference lib="es2026.collection" />
20+
/// <reference lib="es2026.error" />
21+
/// <reference lib="es2026.iterator" />
22+
/// <reference lib="es2026.json" />
23+
/// <reference lib="es2026.math" />
24+
/// <reference lib="es2026.typedarrays" />

tsc/internal/bundled/libs/lib.esnext.error.d.ts renamed to tsc/internal/bundled/libs/lib.es2026.error.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and limitations under the License.
1616

1717
interface ErrorConstructor {
1818
/**
19-
* Indicates whether the argument provided is a built-in Error instance or not.
19+
* Indicates whether the provided value is a built-in Error object.
2020
*/
2121
isError(error: unknown): error is Error;
2222
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABILITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
/// <reference lib="es2026" />
18+
/// <reference lib="dom" />
19+
/// <reference lib="webworker.importscripts" />
20+
/// <reference lib="scripthost" />
21+
/// <reference lib="dom.iterable" />
22+
/// <reference lib="dom.asynciterable" />

0 commit comments

Comments
 (0)