Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

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 @@ -5690,7 +5690,7 @@ describe("Program - diagnostics", () => {
...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 @@ -5577,7 +5577,7 @@ describe("Program - diagnostics", () => {
...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
52 changes: 36 additions & 16 deletions tsc/internal/bundled/embed_generated.go

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

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" />

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.

Note to myself, we need a CI / generate check to verify the contents of these .full files now, I think?

/// <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>;
}
47 changes: 47 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,47 @@
/*! *****************************************************************************
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.
***************************************************************************** */


/**
* A frozen object containing JSON text for a primitive value, created by `JSON.rawJSON()`.
*/
interface RawJSON {
readonly rawJSON: string;
}

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;

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.

A bit funky that this is just an interface but I think that's just how it is?

@a-tarasyuk Oleksandr Tarasiuk (a-tarasyuk) Sep 4, 2026

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.

https://tc39.es/ecma262/2026/multipage/structured-data.html#sec-json.israwjson
https://tc39.es/ecma262/2026/multipage/structured-data.html#sec-json.rawjson

Maybe I’m missing something, but it seems like JSON.rawJSON() returns a regular object, and there’s no RawJSON constructor or global.

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.

Yeah, it's just one of those "it has an internal slot" things nobody can observe... Like who's to say I can't assign basically anything to RawJSON if it has rawJSON: string. But we can't do anything about it

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.

Yeah, I did wonder if it should be a class with a private field though. You can't forge this type.

}
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.

Loading