You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The frontend uses TypeScript 4.6.4 (released March 2022). Newer tooling increasingly assumes >= 4.9 or 5.x, and staying on 4.6 creates growing friction.
Risks of staying on 4.6
Missing language features — satisfies (4.9), const type parameters (5.0), decorators (5.0), using declarations (5.2) are all unavailable. Contributors familiar with modern TS will hit friction.
Weaker type inference — each TS release tightens inference, narrowing, and control flow analysis. Staying on 4.6 means we miss bug-catching improvements the compiler could give us for free.
Security and bug fixes — TS 4.6 is no longer maintained. No patches for compiler bugs or security issues.
Ecosystem drift — @types/* packages and libraries increasingly assume >= 4.9 or 5.x. We already see this with @sinclair/typebox (Storybook dep) failing typecheck because it uses syntax introduced after 4.6.
A trial upgrade to 4.9 surfaced ~805 type errors, mostly from stricter checks. Upgrading to 5.x will likely surface more. This should be treated as a dedicated effort, not bundled with other work.
Proposed fix
Upgrade TypeScript to the latest 5.x (currently 5.9.3) and fix any type errors introduced by stricter checks.
Problem
The frontend uses TypeScript 4.6.4 (released March 2022). Newer tooling increasingly assumes >= 4.9 or 5.x, and staying on 4.6 creates growing friction.
Risks of staying on 4.6
satisfies(4.9),consttype parameters (5.0), decorators (5.0),usingdeclarations (5.2) are all unavailable. Contributors familiar with modern TS will hit friction.@types/*packages and libraries increasingly assume >= 4.9 or 5.x. We already see this with@sinclair/typebox(Storybook dep) failing typecheck because it uses syntax introduced after 4.6.Scope estimate
A trial upgrade to 4.9 surfaced ~805 type errors, mostly from stricter checks. Upgrading to 5.x will likely surface more. This should be treated as a dedicated effort, not bundled with other work.
Proposed fix
Upgrade TypeScript to the latest 5.x (currently 5.9.3) and fix any type errors introduced by stricter checks.
Acceptance criteria
npm run typecheckpassesnpm ciworks without--legacy-peer-depsPart of the Design System Audit (#6606)