Skip to content

Update lib and target fields to a newer ES version #4

@yokuze

Description

@yokuze

Currently, the lib and target fields are pointing at es2019, but newer versions are available in the latest version of TypeScript.

I recommend setting lib to es2022 but target to es2021 since es2021 is fully supported in Node 16: https://node.green/#ES2021 but es2022 is not yet. Most of the differences between es2021 and es2022 are in supported syntax. By setting lib to es2022 but target to es2021, we can take advantage of newer syntax in our code, but TypeScript will transpile down to syntax compatible with es2021/Node 16.

It seems there aren't really any built-in methods/classes/etc added between es2019 and es2022 that would break us in a Node environment that does not use Babel, other than the Error.cause property: https://node.green/#ES2022-features-Error-cause-property

Note: After doing this, we should make sure that any repo that we integrate this into that also uses Babel is using the latest version of core-js.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions