Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a022dd9
feat: add es2026 as a valid target and lib
a-tarasyuk Aug 30, 2026
6d0205a
Merge branch 'main' into feat/63704
a-tarasyuk Sep 1, 2026
2bba2a4
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Sep 3, 2026
fb73068
Merge branch 'main' into feat/63704
a-tarasyuk Sep 4, 2026
43135e9
restore spec wording for Error.isError
a-tarasyuk Sep 4, 2026
2099baf
clean up es2026 lib
a-tarasyuk Sep 4, 2026
97f4eae
Merge branch 'feat/63704' of https://github.com/a-tarasyuk/TypeScript…
a-tarasyuk Sep 4, 2026
bba9bbb
update baseline
a-tarasyuk Sep 4, 2026
4e61768
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Sep 4, 2026
3d4c1c1
add a private field to RawJSON
a-tarasyuk Sep 8, 2026
acabd00
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Sep 8, 2026
5af4a72
update baseline
a-tarasyuk Sep 8, 2026
c6f0b6e
use a plain interface for RawJSON
a-tarasyuk Sep 9, 2026
565aad9
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Sep 9, 2026
b33d820
Merge branch 'main' into feat/63704
a-tarasyuk Sep 11, 2026
6cbe9ab
Merge branch 'main' into feat/63704
a-tarasyuk Sep 14, 2026
1f7d208
Merge branch 'feat/63704' of https://github.com/a-tarasyuk/TypeScript…
a-tarasyuk Sep 16, 2026
67a4d89
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Sep 16, 2026
8325bd9
Merge branch 'main' into feat/63704
a-tarasyuk Sep 19, 2026
a3f0a23
Merge branch 'main' into feat/63704
a-tarasyuk Sep 24, 2026
074a75f
use a module-local class for RawJSON
a-tarasyuk Sep 25, 2026
3d5e091
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Sep 25, 2026
b31c0e2
fix typos
a-tarasyuk Sep 25, 2026
4385042
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Sep 28, 2026
1ca4422
Merge branch 'main' into feat/63704
a-tarasyuk Sep 28, 2026
cce3619
update baseline
a-tarasyuk Sep 28, 2026
bd8adf1
Merge branch 'feat/63704' of https://github.com/a-tarasyuk/TypeScript…
a-tarasyuk Sep 28, 2026
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions packages/typescript/src/enums/scriptTarget.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export enum ScriptTarget {
ES2023 = 10,
ES2024 = 11,
ES2025 = 12,
ES2026 = 13,
ESNext = 99,
JSON = 100,
Latest = ESNext,
Expand Down
1 change: 1 addition & 0 deletions packages/typescript/src/enums/scriptTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export var ScriptTarget: any;
ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023";
ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024";
ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025";
ScriptTarget[ScriptTarget["ES2026"] = 13] = "ES2026";
ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext";
ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON";
ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest";
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/test/async/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7783,7 +7783,7 @@ describe("Program - diagnostics", { concurrency }, () => {
...rangeOf(config, `"invalid"`),
code: 6046,
category: DiagnosticCategory.Error,
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'esnext'.",
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'es2026', 'esnext'.",
}]);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/test/sync/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7617,7 +7617,7 @@ describe("Program - diagnostics", { concurrency }, () => {
...rangeOf(config, `"invalid"`),
code: 6046,
category: DiagnosticCategory.Error,
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'esnext'.",
text: "Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'es2025', 'es2026', 'esnext'.",
}]);
});

Expand Down
39 changes: 27 additions & 12 deletions tsc/internal/bundled/embed_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ interface ArrayConstructor {
* Creates an array from an async iterator or iterable object.
*
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
* @param mapfn A mapping function to call on every element of itarableOrArrayLike.
* @param mapFn A mapping function to call on every element of iterableOrArrayLike.
* Each return value is awaited before being added to result array.
* @param thisArg Value of 'this' used when executing mapfn.
* @param thisArg Value of 'this' used when executing mapFn.
*/
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
}
24 changes: 24 additions & 0 deletions tsc/internal/bundled/libs/lib.es2026.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */


/// <reference lib="es2025" />
/// <reference lib="es2026.array" />
/// <reference lib="es2026.collection" />
/// <reference lib="es2026.error" />
/// <reference lib="es2026.iterator" />
/// <reference lib="es2026.json" />
/// <reference lib="es2026.math" />
/// <reference lib="es2026.typedarrays" />
22 changes: 22 additions & 0 deletions tsc/internal/bundled/libs/lib.es2026.full.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */


/// <reference lib="es2026" />
Comment thread
a-tarasyuk marked this conversation as resolved.
Resolved
/// <reference lib="dom" />
/// <reference lib="webworker.importscripts" />
/// <reference lib="scripthost" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
25 changes: 25 additions & 0 deletions tsc/internal/bundled/libs/lib.es2026.iterator.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */


/// <reference lib="es2025.iterator" />

interface IteratorConstructor {
/**
* Creates an iterator that yields the values of each iterable in sequence.
* @param iterables Iterable objects to concatenate.
*/
concat<T extends readonly unknown[] | []>(...iterables: { -readonly [K in keyof T]: Iterable<T[K]> & object }): IteratorObject<T[number], undefined, unknown>;
}
54 changes: 54 additions & 0 deletions tsc/internal/bundled/libs/lib.es2026.json.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */


export {};

declare class RawJSONInstance {
#isRawJson: unknown;
readonly rawJSON: string;
}

declare global {
/**
* A frozen object containing JSON text for a primitive value, created by `JSON.rawJSON()`.
*/
interface RawJSON extends RawJSONInstance {}

interface JSON {
/**
* Converts a JavaScript Object Notation (JSON) string into an object.
* @param text A valid JSON string.
* @param reviver A function that transforms the results. This function is called for each member of the object.
* If a member contains nested objects, the nested objects are transformed before the parent object is.
* The context object has a `source` property when the property is unmodified and its value is primitive.
* @throws {SyntaxError} If `text` is not valid JSON.
*/
parse(text: string, reviver: (this: any, key: string, value: any, context: { source?: string }) => any): any;

/**
* Creates a frozen object containing JSON text for a primitive value.
* @param text Valid JSON text representing a string, number, boolean, or null value.
* @throws {SyntaxError} If `text` is not valid JSON text for a primitive value.
*/
rawJSON(text: string): RawJSON;

/**
* Indicates whether the provided value is an object returned by `JSON.rawJSON()`.
* @param value The value to test.
*/
isRawJSON(value: unknown): value is RawJSON;
}
}
27 changes: 27 additions & 0 deletions tsc/internal/bundled/libs/lib.es2026.math.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */


/// <reference lib="es2015.iterable" />

interface Math {
/**
* Sums the values in an iterable while minimizing loss of precision.
* @param items An iterable of numbers to sum.
* @throws {TypeError} If `items` is not iterable or contains a value that is not a number.
* @throws {RangeError} If `items` contains 2^53 or more values.
*/
sumPrecise(items: Iterable<number>): number;
}
6 changes: 1 addition & 5 deletions tsc/internal/bundled/libs/lib.esnext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ and limitations under the License.
***************************************************************************** */


/// <reference lib="es2025" />
/// <reference lib="es2026" />
/// <reference lib="esnext.intl" />
/// <reference lib="esnext.collection" />
/// <reference lib="esnext.decorators" />
/// <reference lib="esnext.disposable" />
/// <reference lib="esnext.array" />
/// <reference lib="esnext.error" />
/// <reference lib="esnext.sharedmemory" />
/// <reference lib="esnext.typedarrays" />
/// <reference lib="esnext.temporal" />
/// <reference lib="esnext.date" />
13 changes: 9 additions & 4 deletions tsc/internal/bundled/libs_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 16 additions & 5 deletions tsc/internal/checker/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,15 @@ var getFeatureMap = sync.OnceValue(func() map[string][]FeatureMapEntry {
"Iterator": {
{lib: "es2015", props: []string{}},
},
"IteratorConstructor": {
{lib: "es2026", props: []string{"concat"}},
},
"RawJSON": {
{lib: "es2026", props: []string{}},
},
"JSON": {
{lib: "es2026", props: []string{"isRawJSON", "rawJSON"}},
},
"AsyncIterator": {
{lib: "es2015", props: []string{}},
},
Expand Down Expand Up @@ -1413,7 +1422,7 @@ var getFeatureMap = sync.OnceValue(func() map[string][]FeatureMapEntry {
},
"ArrayConstructor": {
{lib: "es2015", props: []string{"from", "of"}},
{lib: "esnext", props: []string{"fromAsync"}},
{lib: "es2026", props: []string{"fromAsync"}},
},
"ObjectConstructor": {
{lib: "es2015", props: []string{"assign", "getOwnPropertySymbols", "keys", "is", "setPrototypeOf"}},
Expand All @@ -1428,10 +1437,11 @@ var getFeatureMap = sync.OnceValue(func() map[string][]FeatureMapEntry {
"Math": {
{lib: "es2015", props: []string{"clz32", "imul", "sign", "log10", "log2", "log1p", "expm1", "cosh", "sinh", "tanh", "acosh", "asinh", "atanh", "hypot", "trunc", "fround", "cbrt"}},
{lib: "es2025", props: []string{"f16round"}},
{lib: "es2026", props: []string{"sumPrecise"}},
},
"Map": {
{lib: "es2015", props: []string{"entries", "keys", "values"}},
{lib: "esnext", props: []string{
{lib: "es2026", props: []string{
"getOrInsert",
"getOrInsertComputed",
}},
Expand Down Expand Up @@ -1464,7 +1474,7 @@ var getFeatureMap = sync.OnceValue(func() map[string][]FeatureMapEntry {
},
"WeakMap": {
{lib: "es2015", props: []string{}},
{lib: "esnext", props: []string{
{lib: "es2026", props: []string{
"getOrInsert",
"getOrInsertComputed",
}},
Expand Down Expand Up @@ -1532,6 +1542,7 @@ var getFeatureMap = sync.OnceValue(func() map[string][]FeatureMapEntry {
"Uint8Array": {
{lib: "es2022", props: []string{"at"}},
{lib: "es2023", props: []string{"findLastIndex", "findLast", "toReversed", "toSorted", "toSpliced", "with"}},
{lib: "es2026", props: []string{"toBase64", "setFromBase64", "toHex", "setFromHex"}},
},
"Uint8ClampedArray": {
{lib: "es2022", props: []string{"at"}},
Expand Down Expand Up @@ -1578,10 +1589,10 @@ var getFeatureMap = sync.OnceValue(func() map[string][]FeatureMapEntry {
{lib: "es2022", props: []string{"cause"}},
},
"ErrorConstructor": {
{lib: "esnext", props: []string{"isError"}},
{lib: "es2026", props: []string{"isError"}},
},
"Uint8ArrayConstructor": {
{lib: "esnext", props: []string{"fromBase64", "fromHex"}},
{lib: "es2026", props: []string{"fromBase64", "fromHex"}},
},
"DisposableStack": {
{lib: "esnext", props: []string{}},
Expand Down
Loading
Loading