microsoft / microsoft/TypeScript

Add `es2026` as valid `target` and `lib`

Open
#63,704 2 comments 6 reactions 1 assignee Claimed by @DanielRosenwasser View on GitHub
Committed Domain: lib.d.ts ES Next Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
PR merge metrics
PR metrics pending

Description

To quote the spec:

> ECMAScript 2026, the 17th edition, added `Math.sumPrecise` for summing an [iterable](https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-iterable-interface) of Numbers of varying magnitude while minimizing precision loss; `Iterator.concat` for sequencing [iterators](https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-iterator-interface); `Array.fromAsync` for constructing Arrays from [async iterables](https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-asynciterable-interface) and other async sources; `Error.isError` for identifying error objects; methods to `Map.prototype` and `WeakMap.prototype` for providing a default value to use during retrieval when a key is not already present; methods to `Uint8Array` for converting to and from Strings of hexadecimal- and base64-encoded binary data; a parameter to `JSON.parse` revivers to access the matched segment of JSON source; and `JSON.rawJSON` for fine control over `JSON.stringify` output for primitive values.

We need to add the following:

* `Math.sumPrecise`
* `Iterator.concat`
* `JSON.rawJSON`
* An overload(?) for `JSON.stringify`

The following must be moved to an `es2026` lib:

* `Error.isError`
* `Map.prototype.*`
* `getOrInsert`
* `getOrInsertComputed`
* `WeakMap.prototype.*`
* `getOrInsert`
* `getOrInsertComputed`
* `Uint8Array.prototype.*`
* `toBase64`
* `setFromBase64`
* `toHex`
* `setFromHex`
* `Uint8Array.fromHex`
* `Uint8Array.fromBase64`
* `Array.fromAsync`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.