Skip to main content

TypeScript Compatibility

Nova uses TypeScript 6 as one shared compiler baseline for presets, command-line utilities, declaration tests, and generated project templates.

Supported Versions

TypeScript versionStatusProject guidance
6.0.3SupportedPin this exact version in every workspace that directly declares TypeScript.
Other 6.xCompatibleNova's package peer range accepts ^6, but exact project pins prevent drift.
5.xUnsupportedUpgrade the project and its TSConfig files together instead of mixing baselines.
7.xUnsupportedNova will add support only after its compiler-backed features are compatible.

Nova intentionally supports one complete TypeScript major at a time. This keeps the preset behavior, diagnostics, and compiler API usage consistent across every Nova-managed workspace.

Why Nova Depends on the Compiler Version

Most TSConfig presets are JSON, but several Nova features use TypeScript's compiler API directly:

  1. nova utility type-check parses a project and reports project-owned diagnostics.
  2. nova utility transpile parses a project and emits compiled output.
  3. The type declaration Vitest suite inspects TypeScript source and declaration files.
  4. Nova's own declaration generator and validation tooling inspect TypeScript syntax.

TypeScript 6 preserves the compiler API these features use. TypeScript 7 does not yet provide the compatible API surface Nova needs, so installing the latest unpinned TypeScript release is not supported.

Upgrade from TypeScript 5

Update the package version and TSConfig wiring together.

In TypeScript 6, paths entries resolve relative to the TSConfig file when baseUrl is absent. Remove only the TypeScript compilerOptions.baseUrl setting. A Docusaurus site's top-level baseUrl setting controls deployed URLs and is unrelated.

TypeScript 6 Configuration Changes

SettingNova guidance
baseUrlRemove the compiler option. Keep paths for aliases.
rootDirSet it explicitly for projects that emit files, so output layout does not depend on inferred roots.
strictKeep it explicit through dx-strict or a framework's strict base config.
typesList every ambient type package intentionally, or write [] when the project needs none.
noUncheckedSideEffectImportsKeep it explicit through dx-strict so unresolved side-effect imports fail consistently.
module and targetKeep using Nova presets so TypeScript's changing defaults do not alter the project's runtime output.

Verification

After updating the version and configs, reinstall dependencies so the lockfile records TypeScript 6, then run the project checks and build from the monorepo root.

bash
npm install
npm run check
npm run build