Skip to content

0007 — typesafe-i18n generator unusable under TypeScript 7

Status: parked Opened: 2026-07-10 · Area: packages/i18n (generated i18n-types.ts) Reopen trigger: typesafe-i18n releasing TS7 support, the project replacing typesafe-i18n, or the next i18n key/signature change large enough that hand-patching is error-prone.

During the one-vocabulary sweep’s i18n key renames: the typesafe-i18n generator crashes under the repo-standard TypeScript 7 (ts.createProgram is not a function — the classic TS 5-era compiler API again; same root cause family as astro check, see 0004). Only typescript 6.0.3/7.0.2 are present in the tree.

i18n-types.ts type signatures were hand-patched for the renamed keys and verified by tsc (typecheck green, i18n:guard green); the generated JSDoc comments still quote pre-sweep copy and will only refresh when the generator can run again. The terminology guard excludes i18n-types.ts, so the stale comments cannot trip it. If the trigger fires before upstream support lands, options: run the generator once under a pinned typescript@5 in isolation, or swap generators.