Skip to content

feat: add es2026 as a valid target and lib - #64096

Open
Oleksandr Tarasiuk (a-tarasyuk) wants to merge 9 commits into
microsoft:mainfrom
a-tarasyuk:feat/63704
Open

feat: add es2026 as a valid target and lib#64096
Oleksandr Tarasiuk (a-tarasyuk) wants to merge 9 commits into
microsoft:mainfrom
a-tarasyuk:feat/63704

Conversation

@a-tarasyuk

Copy link
Copy Markdown
Contributor

Fixes #63704

@typescript-automation typescript-automation Bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Aug 30, 2026
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) marked this pull request as ready for review August 31, 2026 21:27
Copilot AI balanced review requested due to automatic review settings August 31, 2026 21:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds ES2026 compiler-target and standard-library support, including the APIs requested by #63704.

Changes:

  • Registers es2026 as 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.

@jakebailey
Jake Bailey (jakebailey) requested a balanced review from Copilot September 4, 2026 17:54
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.

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.

What's with all of the misc doc changes?

Not a big deal but seems random

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.

Jake Bailey (@jakebailey) Reverted. It seems I incorrectly used wording changes from the draft...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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?

* 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?

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

@@ -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

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.

There's these doc changes again; I would have expected a simple move

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.

Reverted

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.

This dir should not have changed. This is just a test project for tests / benchmarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add es2026 as valid target and lib

4 participants