Skip to content

Add es2026 as valid target and lib #63704

Description

@DanielRosenwasser

To quote the spec:

ECMAScript 2026, the 17th edition, added Math.sumPrecise for summing an iterable of Numbers of varying magnitude while minimizing precision loss; Iterator.concat for sequencing iterators; Array.fromAsync for constructing Arrays from async iterables 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
  • Array.fromAsync
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CommittedThe team has roadmapped this issueDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptES NextNew featurers for ECMAScript (a.k.a. ESNext)SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions