Skip to content

0004 — `astro check` unusable under TypeScript 7

Status: parked Opened: 2026-07-10 · Area: apps/docs, apps/docs-eng (typecheck lane) Reopen trigger: @astrojs/check / @astrojs/language-server release TypeScript 7 support (watch their changelogs on Astro upgrades), or a docs bug ships that astro check would have caught.

While scaffolding the two docs sites (ADR-0051): astro check crashes under the repo-standard TypeScript 7 — @astrojs/language-server throws Cannot read properties of undefined (reading 'fileExists'); it expects the classic TS 5-era compiler API. Reproduced 2026-07-10 during apps/docs scaffold; @astrojs/check was removed again.

Both docs apps typecheck with astro sync && tsc --noEmit instead — this validates TS in .ts/.mts files and the generated content-collection types, matching the repo’s script standard (admin-console also uses bare tsc). What it does not cover is diagnostics inside .astro component templates; the two sites currently contain no bespoke .astro components (Starlight supplies the components; content is .md/.mdx), so the gap is theoretical today. Bun installs also warn incorrect peer dependency "typescript@7.x" on Astro packages — cosmetic, same root cause. If the trigger fires, restore @astrojs/check and switch both apps’ typecheck scripts back.