Upgrade to TypeScript 7 (#34208)

* Upgrade to TypeScript 7

for massive tsc speed gains

Those on WebStorm will want to upgrade to EAP to reap the benefits of the new TSGo compiler

Some things (module-api & shared-components) which utilise unplugin-dts (and api-extractor) need to hold a copy of ts6 for its conventional lib format and API. TS7 ships with no API until TS7.1.

Other things which use eslint also need ts6 for typescript-eslint.

Some type changes were necessary as TS7 caught some issues.

* Add knip exception

* Fix bad merge
This commit is contained in:
Michael Telatynski
2026-07-14 08:09:03 +00:00
committed by GitHub
parent c6b52b8a73
commit b6859885a3
18 changed files with 523 additions and 244 deletions
+17 -4
View File
@@ -12,8 +12,9 @@ packages:
catalog:
# typescript
typescript: 6.0.3
"@types/node": ts6.0
"typescript": 7.0.2
"@typescript/native": npm:typescript@7.0.2
"@types/node": ts7.0
# react
react: ^19.0.0
react-dom: ^19.0.0
@@ -40,6 +41,11 @@ catalog:
"@vitejs/plugin-react": 6.0.2
unplugin-dts: 1.0.1
catalogs:
ts6:
typescript: npm:@typescript/typescript6@6.0.2
"@types/node": ts6.0
packageExtensions:
fdir:
dependencies:
@@ -147,11 +153,18 @@ overrides:
vite@6 <6.4.3: ^6.4.3
# Workaround for https://github.com/electron/electron/issues/51619
yauzl: "^3.3.1"
# Convince api-extractor to use an up to date Typescript version
typescript: "catalog:"
# Convince api-extractor to use a newer Typescript version
"unplugin-dts>typescript": "catalog:ts6"
"@microsoft/api-extractor>typescript": "catalog:ts6"
# Hold some things back from ts7
"@arcmantle/vite-plugin-import-css-sheet>typescript": "catalog:ts6"
"react-docgen-typescript>typescript": "catalog:ts6"
minimumReleaseAgeExclude:
- "matrix-js-sdk"
- "@matrix-org/*"
- "@vector-im/*"
- "@element-hq/*"
# Temporary for testing purposes
- "@typescript/*"
- typescript@7.0.2