It also covers the TS 6.0 deprecation cleanup ahead of 7.0: dropping moduleResolution
node/node10, setting verbatimModuleSyntax, strict + noUncheckedIndexedAccess, explicit
types, and explicit rootDir now that 6.0 no longer infers it.
Out of scope: TypeScript language syntax and idioms belong to ts-language-patterns;
framework configs that ship their own tsconfig base (Next.js/Astro/Vite plugin skills) and
non-TS build tooling are not covered.
TypeScript Config (TS 6.0)
Agent Workflow (MANDATORY)
Before writing any tsconfig, spawn 3 agents in parallel, one Agent call each with a name:
- fuse-ai-pilot:explore-codebase - Detect runtime (Bun/Node/bundler), existing tsconfig,
package.json type
- fuse-ai-pilot:research-expert - Confirm current flags on typescriptlang.org release notes + runtime docs
- mcp__context7__query-docs -
/microsoft/typescript for any flag whose behavior is unclear
After writing, run fuse-ai-pilot:sniper for validation.
Overview
There are exactly two supported config trajectories in 2026. Pick by runtime, never mix.
| Track |
Runtime |
module |
moduleResolution |
| Bundler |
Bun, Vite, esbuild, webpack |
Preserve |
bundler |
| Node |
Pure Node.js (native type stripping) |
nodenext |
nodenext |
Critical Rules
- Never
moduleResolution: node / node10 - deprecated in 6.0, removed in 7.0. Use bundler or nodenext.
- Always
verbatimModuleSyntax: true - both tracks. Forces explicit import type, matches Node's type stripping.
strict + noUncheckedIndexedAccess - strict is the 6.0 default; add noUncheckedIndexedAccess explicitly.
- Set
types explicitly - 6.0 defaults types to []. Add ["node"], ["bun"], etc. or you lose globals.
- Set
rootDir when sources are nested - 6.0 defaults rootDir to the tsconfig dir, no longer inferred.
Decision: which track?
Runs on Bun, or bundled by Vite/esbuild/webpack/Parcel?
→ Bundler track → references/bundler-track.md
Runs directly on `node file.ts` (type stripping), or emits .js for Node?
→ Node track → references/node-track.md
Migrating an existing 5.x config / seeing deprecation errors?
→ references/deprecations-6.md (do this first, then pick a track)
Reference Guide
Concepts
| Topic |
Reference |
When to Consult |
| Bundler track |
bundler-track.md |
Load when configuring a Bun or bundler (Vite/esbuild/webpack) project |
| Node track |
node-track.md |
Load when configuring a pure Node.js project with native type stripping |
| 6.0 deprecations |
deprecations-6.md |
Load when migrating from TS 5.x or fixing deprecation errors |
Templates
| Template |
When to Use |
| tsconfig.bundler.md |
Complete Bun/bundler tsconfig |
| tsconfig.node.md |
Complete pure-Node tsconfig |
Quick Reference
Bundler / Bun
{
"compilerOptions": {
"module": "Preserve",
"moduleResolution": "bundler",
"verbatimModuleSyntax": true,
"allowImportingTsExtensions": true,
"noEmit": true,
"strict": true,
"noUncheckedIndexedAccess": true
}
}
Pure Node.js (native type stripping)
{
"compilerOptions": {
"module": "nodenext",
"rewriteRelativeImportExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true,
"noEmit": true, // only if you never emit .js
"strict": true
}
}
Best Practices
DO
- Add
"ignoreDeprecations": "6.0" temporarily while migrating, then remove it before adopting TS 7.0
- Use subpath imports
"#/*": "./src/*" in package.json imports (supported under nodenext and bundler)
- Fold any
baseUrl prefix into each paths entry (baseUrl is deprecated)
DON'T
- Mix
module: Preserve with moduleResolution: nodenext (or vice-versa)
- Set
esModuleInterop, allowSyntheticDefaultImports, or alwaysStrict to false (no longer allowed)
- Use
enum, namespace with runtime code, or parameter properties in files run by Node's type stripping
1---2name: ts-config3description: "Use when creating or migrating a tsconfig.json, choosing module/moduleResolution, or fixing TS 6.0 deprecation errors. Not for language syntax (ts-language-patterns)."4versions:5 typescript: "6.0"6 node: "24"7 bun: "1.3"8user-invocable: false9references: references/bundler-track.md, references/node-track.md, references/deprecations-6.md, references/templates/tsconfig.bundler.md, references/templates/tsconfig.node.md10related-skills: ts-language-patterns, solid-generic11metadata:12 source: https://skillmd.com/skills/fusengine/ts-config13---1415<objective>16This skill covers the two supported TypeScript 6.0 config tracks for 2026 — bundler (Bun,17Vite, esbuild, webpack: module Preserve + moduleResolution bundler) and Node (pure Node.js18native type stripping: module nodenext + moduleResolution nodenext) — and how to pick19between them by runtime.2021It also covers the TS 6.0 deprecation cleanup ahead of 7.0: dropping moduleResolution22node/node10, setting verbatimModuleSyntax, strict + noUncheckedIndexedAccess, explicit23types, and explicit rootDir now that 6.0 no longer infers it.2425Out of scope: TypeScript language syntax and idioms belong to ts-language-patterns;26framework configs that ship their own tsconfig base (Next.js/Astro/Vite plugin skills) and27non-TS build tooling are not covered.28</objective>2930# TypeScript Config (TS 6.0)3132## Agent Workflow (MANDATORY)3334Before writing any tsconfig, spawn 3 agents in parallel, one `Agent` call each with a `name`:35361. **fuse-ai-pilot:explore-codebase** - Detect runtime (Bun/Node/bundler), existing tsconfig, `package.json` `type`372. **fuse-ai-pilot:research-expert** - Confirm current flags on typescriptlang.org release notes + runtime docs383. **mcp__context7__query-docs** - `/microsoft/typescript` for any flag whose behavior is unclear3940After writing, run **fuse-ai-pilot:sniper** for validation.4142---4344## Overview4546There are exactly **two supported config trajectories** in 2026. Pick by runtime, never mix.4748| Track | Runtime | `module` | `moduleResolution` |49|-------|---------|----------|--------------------|50| **Bundler** | Bun, Vite, esbuild, webpack | `Preserve` | `bundler` |51| **Node** | Pure Node.js (native type stripping) | `nodenext` | `nodenext` |5253---5455## Critical Rules56571. **Never `moduleResolution: node` / `node10`** - deprecated in 6.0, removed in 7.0. Use `bundler` or `nodenext`.582. **Always `verbatimModuleSyntax: true`** - both tracks. Forces explicit `import type`, matches Node's type stripping.593. **`strict` + `noUncheckedIndexedAccess`** - strict is the 6.0 default; add `noUncheckedIndexedAccess` explicitly.604. **Set `types` explicitly** - 6.0 defaults `types` to `[]`. Add `["node"]`, `["bun"]`, etc. or you lose globals.615. **Set `rootDir` when sources are nested** - 6.0 defaults `rootDir` to the tsconfig dir, no longer inferred.6263---6465## Decision: which track?6667```68Runs on Bun, or bundled by Vite/esbuild/webpack/Parcel?69 → Bundler track → references/bundler-track.md7071Runs directly on `node file.ts` (type stripping), or emits .js for Node?72 → Node track → references/node-track.md7374Migrating an existing 5.x config / seeing deprecation errors?75 → references/deprecations-6.md (do this first, then pick a track)76```7778---7980## Reference Guide8182### Concepts8384| Topic | Reference | When to Consult |85|-------|-----------|-----------------|86| **Bundler track** | [bundler-track.md](references/bundler-track.md) | Load when configuring a Bun or bundler (Vite/esbuild/webpack) project |87| **Node track** | [node-track.md](references/node-track.md) | Load when configuring a pure Node.js project with native type stripping |88| **6.0 deprecations** | [deprecations-6.md](references/deprecations-6.md) | Load when migrating from TS 5.x or fixing deprecation errors |8990### Templates9192| Template | When to Use |93|----------|-------------|94| [tsconfig.bundler.md](references/templates/tsconfig.bundler.md) | Complete Bun/bundler tsconfig |95| [tsconfig.node.md](references/templates/tsconfig.node.md) | Complete pure-Node tsconfig |9697---9899## Quick Reference100101### Bundler / Bun102103```jsonc104{105 "compilerOptions": {106 "module": "Preserve",107 "moduleResolution": "bundler",108 "verbatimModuleSyntax": true,109 "allowImportingTsExtensions": true,110 "noEmit": true,111 "strict": true,112 "noUncheckedIndexedAccess": true113 }114}115```116117### Pure Node.js (native type stripping)118119```jsonc120{121 "compilerOptions": {122 "module": "nodenext",123 "rewriteRelativeImportExtensions": true,124 "erasableSyntaxOnly": true,125 "verbatimModuleSyntax": true,126 "noEmit": true, // only if you never emit .js127 "strict": true128 }129}130```131132---133134## Best Practices135136### DO137- Add `"ignoreDeprecations": "6.0"` **temporarily** while migrating, then remove it before adopting TS 7.0138- Use subpath imports `"#/*": "./src/*"` in `package.json` `imports` (supported under `nodenext` and `bundler`)139- Fold any `baseUrl` prefix into each `paths` entry (`baseUrl` is deprecated)140141### DON'T142- Mix `module: Preserve` with `moduleResolution: nodenext` (or vice-versa)143- Set `esModuleInterop`, `allowSyntheticDefaultImports`, or `alwaysStrict` to `false` (no longer allowed)144- Use `enum`, `namespace` with runtime code, or parameter properties in files run by Node's type stripping