feat: add es2026 as a valid target and lib - #64096
feat: add es2026 as a valid target and lib#64096Oleksandr Tarasiuk (a-tarasyuk) wants to merge 9 commits into
Conversation
fefecb3 to
a022dd9
Compare
There was a problem hiding this comment.
Pull request overview
Adds ES2026 compiler-target and standard-library support, including the APIs requested by #63704.
Changes:
- Registers
es2026as a target, default standard target, and library. - Adds ES2026 API declarations and preserves
esnext.*aliases. - Adds conformance tests and refreshes generated baselines.
Reviewed changes
Copilot reviewed 136 out of 540 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/typescript/src/enums/scriptTarget*.ts |
Exposes ES2026 publicly. |
packages/typescript/test/{async,sync}/api.test.ts |
Updates target diagnostics. |
tsc/internal/core/{compileroptions,scripttarget_stringer_generated}.go |
Defines and formats the target. |
tsc/internal/tsoptions/enummaps.go |
Registers target, libraries, and compatibility aliases. |
tsc/internal/transformers/estransforms/definitions.go |
Selects the ES2026 transform pipeline. |
tsc/internal/checker/utilities.go |
Adds ES2026 library suggestions. |
tsc/internal/bundled/libs/lib.es2026*.d.ts |
Defines the ES2026 library and APIs. |
tsc/internal/bundled/libs/lib.esnext.d.ts |
Makes ESNext inherit ES2026. |
tsc/internal/bundled/{embed_generated,libs_generated}.go |
Embeds and registers new libraries. |
tsc/internal/compiler/program_test.go |
Updates expected ESNext library ordering. |
tsc/testdata/fixtures/compiler/*.ts |
Synchronizes compiler fixtures. |
tsc/testdata/tests/cases/conformance/es2026/*.ts |
Tests ES2026 APIs and diagnostics. |
tsc/testdata/baselines/reference/** |
Refreshes generated compiler, build, watch, API, and conformance baselines. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| interface ErrorConstructor { | ||
| /** | ||
| * Indicates whether the argument provided is a built-in Error instance or not. | ||
| * Indicates whether the provided value is a built-in Error object. |
There was a problem hiding this comment.
What's with all of the misc doc changes?
Not a big deal but seems random
There was a problem hiding this comment.
Jake Bailey (@jakebailey) Reverted. It seems I incorrectly used wording changes from the draft...
There was a problem hiding this comment.
🔵 Needs a closer look
The public target and library surface spans hundreds of generated baselines and warrants final human validation against the ES2026 specification.
Review details
- Files reviewed: 136/540 changed files
- Comments generated: 0 new
- Review effort level: Balanced
| ***************************************************************************** */ | ||
|
|
||
|
|
||
| /// <reference lib="es2026" /> |
There was a problem hiding this comment.
Note to myself, we need a CI / generate check to verify the contents of these .full files now, I think?
| * Indicates whether the provided value is an object returned by `JSON.rawJSON()`. | ||
| * @param value The value to test. | ||
| */ | ||
| isRawJSON(value: unknown): value is RawJSON; |
There was a problem hiding this comment.
A bit funky that this is just an interface but I think that's just how it is?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
| @@ -32,8 +32,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike> { | |||
| * @param string The base64-encoded string. | |||
| * @param options If provided, specifies the alphabet and handling of the last chunk. | |||
| * @returns An object containing the number of bytes read and written. | |||
| * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last | |||
There was a problem hiding this comment.
There's these doc changes again; I would have expected a simple move
There was a problem hiding this comment.
Reverted
There was a problem hiding this comment.
This dir should not have changed. This is just a test project for tests / benchmarks.
Fixes #63704