-
Notifications
You must be signed in to change notification settings - Fork 13.8k
feat: add es2026 as a valid target and lib #64096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a022dd9
6d0205a
2bba2a4
fb73068
43135e9
2099baf
97f4eae
bba9bbb
4e61768
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
|---|---|---|
| @@ -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" /> |
| 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" /> | ||
| /// <reference lib="dom" /> | ||
| /// <reference lib="webworker.importscripts" /> | ||
| /// <reference lib="scripthost" /> | ||
| /// <reference lib="dom.iterable" /> | ||
| /// <reference lib="dom.asynciterable" /> | ||
| 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>; | ||
| } |
| 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; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://tc39.es/ecma262/2026/multipage/structured-data.html#sec-json.israwjson Maybe I’m missing something, but it seems like
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| } | ||
| 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; | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
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
.fullfiles now, I think?