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:
| Setting | Value | What it means for your code |
|---|---|---|
strict | true | the full strict mode, including null checks and no implicit any |
no | true | array[i] and record[key] are T | undefined until you check them |
target, module | ES2022, ESNext | modern syntax and native ES modules |
module | Bundler | imports resolve as a bundler does; no . extension needed |
lib | es2022, esnext., DOM, DOM. | ES2022 plus the Temporal types of Node.js 26, and the DOM |
isolated, module | true | every file compiles on its own and is a module, as single-file tools need |
declaration, declaration | true | emitted output brings . files that lead back to the source |
es, resolve | true | default imports from CommonJS, and typed JSON imports |
skip | true | declaration files in node_ are not checked |
incremental | false | no . files |
The presets change only what their kind of code needs; see Presets.
The package and your repository#
| The shared configuration sets | Your tsconfig. sets |
|---|---|
| strictness, target, module system, resolution | which files: include, exclude |
the libraries of each kind of code (lib, jsx) | output: out, root, no |
the Node types for nodejs., the Next plugin for nextjs. | aliases: paths |
additional type packages: types, and editor plugins | |
| nothing about which commands run | the 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.