---
id: "packages/typescript-config"
title: "typescript-config"
description: "The shared TypeScript compiler options of the Active packages, for Node code, React libraries and Next.js applications."
url: "/packages/typescript-config"
locale: "en"
revision: "9f0f029a77151302"
---

# typescript-config

`@workspace/typescript-config` is the TypeScript half of the shared
[development basis](/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` |
| `noUncheckedIndexedAccess` | `true` | `array[i]` and `record[key]` are `T \| undefined` until you check them |
| `target`, `module` | `ES2022`, `ESNext` | modern syntax and native ES modules |
| `moduleResolution` | `Bundler` | imports resolve as a bundler does; no `.js` extension needed |
| `lib` | `es2022`, `esnext.temporal`, `DOM`, `DOM.Iterable` | ES2022 plus the Temporal types of Node.js 26, and the DOM |
| `isolatedModules`, `moduleDetection: force` | `true` | every file compiles on its own and is a module, as single-file tools need |
| `declaration`, `declarationMap` | `true` | emitted output brings `.d.ts` files that lead back to the source |
| `esModuleInterop`, `resolveJsonModule` | `true` | default imports from CommonJS, and typed JSON imports |
| `skipLibCheck` | `true` | declaration files in `node_modules` are not checked |
| `incremental` | `false` | no `.tsbuildinfo` files |

The presets change only what their kind of code needs; see [Presets](/packages/typescript-config/presets).

## The package and your repository

| The shared configuration sets | Your `tsconfig.json` sets |
| --- | --- |
| strictness, target, module system, resolution | which 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.json` | 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](/packages/typescript-config/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](/packages/typescript-config/getting-started).

## What it does not do

- **No lint rules.** Those are in [eslint-config](/packages/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.
