Skip to content

Runbook: typechecking

Run the full workspace typecheck from the repository root:

Terminal window
bun run typecheck

For one package, use its script:

Terminal window
bun run --cwd apps/teacher-portal typecheck

The package scripts use Bun’s built-in TypeScript checker, available since Bun 1.4.4. They pass --no-script because bare bun check can resolve to a package’s broader check script. The root still runs Turbo’s package graph and then the separate tests/tsconfig.json project. The documentation packages still prepare their Astro types before checking; engineering docs also run their source synchronization first.

The installed TypeScript packages have separate roles. TypeScript 7 remains available for editor tooling. The local TypeScript 6 aliases in the documentation and i18n packages provide the legacy JavaScript compiler API used by their tools; checking their source with Bun does not replace that API. Keep those dependencies when changing the checker.

Bun bundles its checker and standard-library declarations. Its behavior follows the Bun version, independently of the installed TypeScript package. Turbo includes both package.json and mise.toml in its cache inputs. The workspace pins stable Bun for builds and runtimes, and mise selects canary for local checks to support native type-aware lint. See the code-quality runbook for the CI configuration.

The existing check, validate and validate:full scripts retain their broader checks. Bun’s checker writes no JavaScript or declaration files. See the Bun checker documentation.