Skip to content

upgrade to ES2022 #632

@tharvik

Description

@tharvik

currently, we are using EcmaScript 5 (ES5) which is quite old (released in 2009). as the JS ecosystem is moving forward, and quite fast theses years (one new per year), we need to move to a newer version. TypeScript allow uses to use some of theses features by transpiling to older ES via helpers, but it's only partial support, and using theses helpers instead of browser implementations do have size and runtime costs. here goes a list of features that will benefit the project

  • async/await support & standard modules (ES6/ES2015)
  • async iterator/generator (ES2018)
  • Array.flatMap (ES2019)
  • null coalesing & optional chaining (ES2020)
  • Error.cause (ES2022)

~94% of browsers do support ES2022 (except static field block init), that looks wide enough support to me.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions