Search documentation

Search all pages, headings and text, in the current package or topic or in all documentation.

typescript-config

The shared TypeScript compiler options of the Active packages, for Node code, React libraries and Next.js applications.

@workspace/typescript-config 1.0.0Developmentunreleased, maintained in Foundation as a copy

@workspace/typescript-config is the TypeScript half of the shared development basis. It holds one strict base and three presets for the kinds of code a repository has. Your tsconfig.json extends one preset and adds only what is its own: which files, which paths, which output.

It is configuration only: four JSON files, no code and no dependencies of its own. TypeScript itself, and the type packages a preset names, come from your repository.

What the shared configuration sets#

Every preset carries the strict base:

SettingValueWhat it means for your code
stricttruethe full strict mode, including null checks and no implicit any
noUncheckedIndexedAccesstruearray[i] and record[key] are T | undefined until you check them
target, moduleES2022, ESNextmodern syntax and native ES modules
moduleResolutionBundlerimports resolve as a bundler does; no .js extension needed
libes2022, esnext.temporal, DOM, DOM.IterableES2022 plus the Temporal types of Node.js 26, and the DOM
isolatedModules, moduleDetection: forcetrueevery file compiles on its own and is a module, as single-file tools need
declaration, declarationMaptrueemitted output brings .d.ts files that lead back to the source
esModuleInterop, resolveJsonModuletruedefault imports from CommonJS, and typed JSON imports
skipLibChecktruedeclaration files in node_modules are not checked
incrementalfalseno .tsbuildinfo files

The presets change only what their kind of code needs; see Presets.

The package and your repository#

The shared configuration setsYour tsconfig.json sets
strictness, target, module system, resolutionwhich files: include, exclude
the libraries of each kind of code (lib, jsx)output: outDir, rootDir, noEmit
the Node types for nodejs.json, the Next plugin for nextjs.jsonaliases: paths
additional type packages: types, and editor plugins
nothing about which commands runthe typecheck script and the TypeScript version it installs

Do not relax strict, noUncheckedIndexedAccess, target, moduleResolution or declaration in your own file; see Extending.

How you receive it#

typescript-config is maintained in Foundation and reaches your repository as an unchanged copy of its folder, not by managed transfer: it is not in the transfer register, so a bundle cannot carry it and the applier does not check it. You compare your copy with Foundation's by hand. No version of it is recorded as a release. See Getting started.

What it does not do#

  • No lint rules. Those are in eslint-config.
  • No build. The presets describe a type-check; Next.js, Vite or another tool compiles.
  • No include. Which files belong to a project is always yours to say.

This page as Markdown