chore: upgrade to TypeScript 5.7, ensure tsconfig targed and lib properties match the APIs we support (#9473)

TS 5.7 added support for ES2024. By keeping target: “esnext”, we would
have accidentally set our minimum supported ES version to ES2024.

This sets it to ES2022, which is the version supported by Node 18
This commit is contained in:
Alessio Gravili
2024-11-23 16:35:27 -07:00
committed by GitHub
parent 23d54a76c1
commit 13fc94dc4d
47 changed files with 357 additions and 322 deletions

View File

@@ -4,7 +4,7 @@
"rootDir": ".",
"declaration": true,
"declarationMap": true,
"target": "esnext",
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"allowJs": true,
@@ -12,7 +12,11 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"DOM",
"DOM.Iterable",
"ES2022"
],
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,