Skip to content

Commit

Permalink
build: enable "esnext"
Browse files Browse the repository at this point in the history
Problem:
Can't use newer JS features like `Array.at()`

Solution:
Set `lib=esnext`. This is still compatible with older node.js (our CI
currently tests node.js 14), because `target=es2015`. So typescript will
polyfill to es2015, but we can use esnext featuers in our `.ts` code.
  • Loading branch information
justinmk committed Feb 3, 2024
1 parent 619e29d commit 0d88e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"lib": ["es2015", "dom"],
"lib": ["esnext", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": false,
Expand Down

0 comments on commit 0d88e51

Please sign in to comment.