Skip to content

chore: evaluate upgrading to TypeScript 7 #1113

Closed

Description

@Astro-Han

Context

TypeScript 7.0 (stable, 2026-07-08) replaces the JS-based compiler with the Go-native port ("Corsa"). Official benchmarks show 8–12x faster full builds and type-checks vs TS 6, ~20% lower memory, and 8–13x faster editor diagnostics. TS 6.x is the final JS-based line, so the ecosystem will converge on 7.

We are on typescript@^5.9.3 (single root devDependency shared by all workspaces).

Measured baseline on main (Apple Silicon)

  • npm run typecheck: ~7s wall across 8 workspaces
  • npm run build: ~15s wall (tsc portion ~10–12s; the rest is vite/Electron packaging)
  • ~400k LOC TS, 764 non-test files

Practical advantages for this repo

  1. Editor responsiveness — language-service diagnostics and project load improve ~8–13x at our scale, with ~20% lower memory alongside Electron dev sessions. This is the largest day-to-day win.
  2. Dev loop and CI — an estimated 5–10s off each full typecheck/build; larger relative gains for tsc --watch.
  3. Staying on the supported line — TS 6.x is the last JS implementation; @types packages and tooling will increasingly assume 7. Upgrading while the surface is small avoids a bigger jump later.

Compatibility position (unusually good)

  • Zero direct uses of the TypeScript programmatic API anywhere in the repo.
  • Toolchain does not embed TS: biome (lint/format), knip 6 (oxc-parser), node:test, esbuild/vite (emit-independent).
  • Single version pin at root; no per-package overrides.

Costs and risks

  • Skipping TS 6 means deprecated behaviors surface as a hard-error batch at once: new defaults (strict: true, module: esnext, noUncheckedSideEffectImports) and removed flags (target: es5, moduleResolution: node10, out, …). Requires an audit of the base tsconfig and per-package overrides.
  • Programmatic API stability lands in 7.1 — not an issue today, relevant only if we add TS-API-based tooling.

Is it YAGNI?

The speed win is real but modest in absolute terms at our size — seconds per iteration, not minutes. The stronger arguments are editor UX and avoiding migration debt on a dead-end line. Neither urgent, both recurring.

Proposal

Time-boxed spike on a chore/ts7-upgrade worktree:

  1. Bump root typescript to ^7; audit tsconfigs against removed/changed flags.
  2. Fix the resulting error batch; record its size and nature.
  3. Measure before/after: npm run typecheck, npm run build, plus a day of normal development for editor feel.
  4. Decide merge vs. defer on that data; if blocked, document and revisit at 7.1.

Activity

  1. added
    enhancement
    on Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions