[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ABK9TSP7QFVRKXQXGAEZH3":3,"skill-same:01M7ABK9TSP7QFVRKXQXGAEZH3":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7ABK9TSP7QFVRKXQXGAEZH3","tsconfig",null,"Configure a tsconfig.json by runtime — pick module, moduleResolution, target, strict, and emit for a bundler, Node, library, or browser-ESM project, and fix the module\u002Fstrict\u002Femit errors a wrong config causes. Use when setting up or editing a tsconfig.json, choosing module or moduleResolution, adding project references for a monorepo, or resolving TypeScript module-resolution \u002F verbatimModuleSyntax \u002F declaration \u002F strict errors. Not for bundler config files (vite.config, webpack.config) themselves — only the TypeScript compiler options.","j0hanz\u002Fj0hanz-marketplace","j0hanz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F159924955?v=4","01M7ABFK415CKHXYV9GZRJ16T7","Linus Johansson","01M7ABFK52FCPP2PNBH1YR7ZPA",0,"MIT","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript-pro\u002Fskills\u002Ftsconfig\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tsconfig\ndescription: Configure a tsconfig.json by runtime — pick module, moduleResolution, target, strict, and emit for a bundler, Node, library, or browser-ESM project, and fix the module\u002Fstrict\u002Femit errors a wrong config causes. Use when setting up or editing a tsconfig.json, choosing module or moduleResolution, adding project references for a monorepo, or resolving TypeScript module-resolution \u002F verbatimModuleSyntax \u002F declaration \u002F strict errors. Not for bundler config files (vite.config, webpack.config) themselves — only the TypeScript compiler options.\nmetadata:\n  category: reference\n---\n\n# tsconfig by runtime\n\nA tsconfig.json is **runtime-driven**: `module`, `moduleResolution`, `target`, `strict`, and `emit` follow where the output runs, not preference. One tsconfig represents **one environment** — server code, DOM code, worker code, tests each get their own, connected with [project references](#project-references-for-monorepos). Run this guide once per tsconfig.\n\n## How to use\n\n1. Identify the runtime the output of _this_ tsconfig runs in (bundler \u002F Node \u002F library \u002F browser-ESM).\n2. Apply the matching row of the [decision table](#runtime-decision-table), then every [library rule](#library-specific-rules) or [project-reference](#project-references-for-monorepos) rule that applies.\n3. Set each of `module`, `moduleResolution`, `target`, `strict`, `emit` with a one-line reason; drop anything an [implied value](#implied-values-dont-set-redundantly) already provides.\n\nDone when all five are set with a stated reason and no implied value is set redundantly.\n\n## Principle\n\n- **Resolution is infectious or portable.** `moduleResolution: \"bundler\"` is _infectious_ — it permits extensionless imports that only a bundler can resolve, so the emitted code breaks in Node. `moduleResolution: \"nodenext\"` is _portable_ — code that resolves in Node almost always resolves in bundlers too. Default to portable unless a bundler owns emit.\n- **Libraries compile under the strictest settings.** A consumer's config is unknowable; satisfying the strictest satisfies all. See [library rules](#library-specific-rules).\n- **`target` downlevels, and implies `lib`.** It decides which JS features are rewritten vs left intact, and the default ambient type definitions. Pick the _lowest_ environment you must support.\n- **`module` drives resolution and interop, not just emit.** Even with `noEmit`, TS type-checks against the module format it _would_ emit — so `module` shapes the types you see on imports.\n\n## Runtime decision table\n\n| Runtime                  | `module`                         | `moduleResolution` | `target`                           | `strict` | emit                                                                                      |\n| :----------------------- | :------------------------------- | :----------------- | :--------------------------------- | :------- | :---------------------------------------------------------------------------------------- |\n| Bundler (app)            | `esnext` (or `preserve`)         | `bundler`          | `esnext`, or your bundler's target | `true`   | `noEmit: true` (or `emitDeclarationOnly`)                                                 |\n| Node (compile + run)     | `nodenext`                       | implied `nodenext` | implied `esnext`                   | `true`   | default; `verbatimModuleSyntax: true`                                                     |\n| Library                  | `node18` (lowest Node supported) | implied `node18`   | `es2020` (lowest ES supported)     | `true`   | `declaration`, `declarationMap`, `sourceMap`, `rootDir`, `outDir`, `verbatimModuleSyntax` |\n| Browser-ESM (no bundler) | `nodenext`                       | implied `nodenext` | `esnext` or browser baseline       | `true`   | default, or `noEmit` if another tool emits                                                |\n\nWhy each row:\n\n- **Bundler.** The bundler resolves and emits; TS only type-checks, so `noEmit` and `bundler` resolution (extensionless imports, package `exports`\u002F`imports`). Set `verbatimModuleSyntax: true` (or `isolatedModules`) so single-file transpilers in the pipeline stay safe. Avoid `\"type\": \"module\"` and `.mts` here — some bundlers' ESM\u002FCJS interop can't be modeled under `bundler` resolution (TS issue #54102). Use `preserve` instead of `esnext` only if a file genuinely mixes `import` and `require`.\n- **Node.** `nodenext` picks CJS vs ESM per file from the extension and the nearest `package.json` `\"type\"`, and enforces Node's resolution rules (extensions required on ESM relative imports). For ESM output, set `\"type\": \"module\"` or use `.mts`. Pin a specific Node version by `extends`-ing `@tsconfig\u002FnodeNN` instead of relying on the floating `esnext` target.\n- **Library.** Portable by default: `node18` resolution + `.js` extensions in relative imports work in Node _and_ bundlers. `target`\u002F`module` set to the _lowest_ you support so emitted code and `.d.ts` globals don't assume newer runtimes. See [library rules](#library-specific-rules) for the full strictness\u002Femit set.\n- **Browser-ESM, no bundler.** No dedicated option; `nodenext` ESM rules approximate browser ESM (they enforce extensions). Use `paths` to stand in for import maps — point `https:\u002F\u002Fesm.sh\u002Fpkg` at local `@types`, or map `\"*\"` to an empty file to reject unlisted bare specifiers.\n\n## Implied values (don't set redundantly)\n\nSetting these explicitly is noise and can drift from the option that drives them:\n\n- `module: \"nodenext\"` ⇒ `moduleResolution: \"nodenext\"`, `esModuleInterop: true`, `target: \"esnext\"`\n- `module: \"node20\"` ⇒ `target: \"es2023\"`\n- `module: \"preserve\"` ⇒ `moduleResolution: \"bundler\"`, `esModuleInterop: true`\n- `composite: true` ⇒ `declaration: true`, `incremental: true`, `rootDir` = the tsconfig directory\n- `verbatimModuleSyntax: true` ⇒ `isolatedModules: true`\n- `esModuleInterop: true` ⇒ `allowSyntheticDefaultImports: true`\n- `target` ≥ `ES2022` ⇒ `useDefineForClassFields: true`\n\n## Library-specific rules\n\nLibraries are different: the consumer's config is unknown, so compile under the **strictest** settings — satisfying them tends to satisfy all others.\n\n1. **`strict: true`, especially `strictNullChecks`.** Type-level constructs land in emitted `.d.ts` and only error under strict. `interface Sub extends Super { foo: string | undefined }` is an error _only_ with `strictNullChecks`; a consumer with strict on will hit it. Code rarely errors _only_ when strict is off, so strict is safe to impose.\n2. **Portable imports: write `.js` extensions.** `export * from \".\u002Futils.js\"` works in Node _and_ bundlers; `export * from \".\u002Futils\"` only works in bundlers (infectious). `module: \"node18\"` enforces this.\n3. **`module: \"node18\"`, not `bundler`.** Bundler resolution is infectious — it lets through code that crashes in Node with `ERR_MODULE_NOT_FOUND ... Did you mean to import .\u002Futils.js?`.\n4. **`verbatimModuleSyntax: true`.** Guarantees portability regardless of the consumer's `esModuleInterop` (imports that work only with or only without it are rejected), and blocks `export default` in modules emitted as CommonJS, which would force Node-ESM and bundler consumers to consume the module differently.\n5. **`declaration: true`** emits the `.d.ts` consumers need for types. **`declarationMap` + `sourceMap`** add Go-To-Definition and debugging back to your `.ts` source — only useful if you ship the source; both trade library size for DX, your call.\n6. **`rootDir` + `outDir` separate** (e.g. `src` → `dist`). _Necessary_ if you publish source: without it, extension substitution makes consumers load your `.ts` instead of `.d.ts`, causing type errors and slowdowns.\n7. **Prefer not to bundle.** If you do bundle, your bundler must bundle _declarations_ too — otherwise `.d.ts` files keep extensionless imports that error under a `nodenext` consumer and infect referenced types with `any`. If your bundler can't bundle declarations, use `moduleResolution: \"nodenext\"` so the declarations stay consumer-safe.\n8. **Dual-emit (CJS + ESM from one compile) is not provably type-safe.** A single compilation checks one output; dependencies can expose different APIs to CJS vs ESM. If you dual-emit, test both bundles (`@arethetypeswrong\u002Fcli`) before publishing.\n\n## Project references for monorepos\n\nSplit a large or multi-environment program into smaller projects, each with its own tsconfig, connected with `references`. Gains: faster incremental builds, enforced layering, per-environment options.\n\n- **`references`** — top-level array: `{ \"references\": [{ \"path\": \"..\u002Fsrc\" }] }`. Importing from a referenced project loads its _output_ `.d.ts`, not its source.\n- **`composite: true`** on every referenced project — its implications are in the [implied-values table](#implied-values-dont-set-redundantly); beyond those, it _requires_ every implementation file to be matched by `include` or listed in `files` (tsc names anything missed).\n- **Build with `tsc -b`** (build mode). It builds referenced projects in dependency order, does up-to-date checks, and effectively forces `noEmitOnError` for all projects (otherwise a stale dependency would hide its error after one build). Flags: `--verbose`, `--dry`, `--clean`, `--force`, `--watch`.\n- **`declarationMap: true`** so editors' Go-To-Definition and rename cross project boundaries.\n- **Solution tsconfig** at the root: `\"files\": []` plus `references` to every leaf project. `tsc -b` then builds the whole graph from one entry point. (Empty `files` is allowed once you have ≥1 reference.)\n- **`extends`** a shared base tsconfig to centralize common `compilerOptions`; each leaf overrides only what differs. `files`\u002F`include`\u002F`exclude` are _overwritten_, not merged, by the inheriting config.\n\n## Flags behind the table\n\n- **`strict: true`** turns on the strict family (`strictNullChecks`, `noImplicitAny`, `noImplicitThis`, `strictFunctionTypes`, `strictBindCallApply`, `strictPropertyInitialization`, `strictBuiltinIteratorReturn`, `useUnknownInCatchVariables`, `alwaysStrict`). Default is `true` in modern TS. Full per-flag detail in `OPTIONS.md`.\n- **`verbatimModuleSyntax: true`** — what you write is what's emitted: it errors rather than rewriting `import`↔`require`, forcing intentional CJS vs ESM. Incompatible with dual-emit from one source. Erasure mechanics and deprecated-flag lineage in [`OPTIONS.md`](OPTIONS.md).\n- **`isolatedModules: true`** — flags constructs single-file transpilers (Babel, swc, `ts.transpileModule`) can't handle; implied by `verbatimModuleSyntax`. Detail in [`OPTIONS.md`](OPTIONS.md).\n- **`esModuleInterop: true`** — fixes CJS\u002FAMD\u002FUMD default-import interop; implied by `nodenext`\u002F`preserve`, implies `allowSyntheticDefaultImports` (type-checking only). Helper mechanics in [`OPTIONS.md`](OPTIONS.md).\n\nFor the full strict-family list, interop-flag mechanics, deprecated flags, and `jsx`\u002F`lib`\u002Femit knobs, see [`OPTIONS.md`](OPTIONS.md).\n\n## Symptom → fix\n\n| Symptom                                                                                                                                   | Fix                                                                                                                                                |\n| :---------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ERR_MODULE_NOT_FOUND ... Did you mean to import .\u002Futils.js?`                                                                             | Relative ESM import lacks an extension. Add `.js`. Required under `nodenext`; portable for libraries.                                              |\n| `Cannot find module '.\u002Fsettings.json'`                                                                                                    | Enable `resolveJsonModule`.                                                                                                                        |\n| Default import of a CJS module errors (`import x from \"cjs-mod\"`)                                                                         | Enable `esModuleInterop` (implied by `nodenext`\u002F`preserve`); or use `import * as x`.                                                               |\n| `verbatimModuleSyntax`: `import`\u002F`export` not rewritten to `require`, errors instead                                                      | Use `import x = require(...)` \u002F `export = ...` for CJS; set `package.json` `\"type\"` to match intent.                                               |\n| `Namespaces are not allowed in global script files when 'isolatedModules' is enabled`                                                     | Add `export {}` to the file, or set `moduleDetection: \"force\"`.                                                                                    |\n| `This syntax is not allowed when 'erasableSyntaxOnly' is enabled` (param properties, `enum`, `namespace`, `import =`, `export =`, `\u003CT>x`) | You target Node's native type-stripping. Rewrite the construct, or drop `erasableSyntaxOnly` and use a real transpiler.                            |\n| Re-exporting a type errors under `isolatedModules` \u002F a single-file transpiler                                                             | Mark it: `export { type Foo }` \u002F `import type { Foo }`.                                                                                            |\n| `Cannot find module '...'` on a side-effect import (`import \".\u002Fx.css\"`) after enabling `noUncheckedSideEffectImports`                     | Add `declare module \"*.css\" {}` in a global `.d.ts`.                                                                                               |\n| Consumer gets `any` \u002F declaration errors from a _bundled_ library under `nodenext`                                                        | Your bundler kept extensionless imports in `.d.ts`. Don't bundle the library, or bundle declarations too; else set `moduleResolution: \"nodenext\"`. |\n| `verbatimModuleSyntax` can't be enabled with dual CJS+ESM emit                                                                            | Fundamentally incompatible with one compile emitting both. Emit one format per compile, or drop it.                                                |\n| `allowImportingTsExtensions` can only be used with `noEmit`\u002F`emitDeclarationOnly`                                                         | Set one of those — the bundler emits the JS.                                                                                                       |\n| Library consumer errors under _their_ `strict` but not yours                                                                              | Compile the library with `strict: true`; type-level code leaks into `.d.ts` and only errors under strict (e.g. `strictNullChecks`).                |\n| `exactOptionalPropertyTypes`: `Type 'undefined' is not assignable`                                                                        | Don't assign `undefined` to an optional prop; add `undefined` to its type, or omit the key.                                                        |\n","# tsconfig by runtime\n\nA tsconfig.json is **runtime-driven**: `module`, `moduleResolution`, `target`, `strict`, and `emit` follow where the output runs, not preference. One tsconfig represents **one environment** — server code, DOM code, worker code, tests each get their own, connected with [project references](#project-references-for-monorepos). Run this guide once per tsconfig.\n\n## How to use\n\n1. Identify the runtime the output of _this_ tsconfig runs in (bundler \u002F Node \u002F library \u002F browser-ESM).\n2. Apply the matching row of the [decision table](#runtime-decision-table), then every [library rule](#library-specific-rules) or [project-reference](#project-references-for-monorepos) rule that applies.\n3. Set each of `module`, `moduleResolution`, `target`, `strict`, `emit` with a one-line reason; drop anything an [implied value](#implied-values-dont-set-redundantly) already provides.\n\nDone when all five are set with a stated reason and no implied value is set redundantly.\n\n## Principle\n\n- **Resolution is infectious or portable.** `moduleResolution: \"bundler\"` is _infectious_ — it permits extensionless imports that only a bundler can resolve, so the emitted code breaks in Node. `moduleResolution: \"nodenext\"` is _portable_ — code that resolves in Node almost always resolves in bundlers too. Default to portable unless a bundler owns emit.\n- **Libraries compile under the strictest settings.** A consumer's config is unknowable; satisfying the strictest satisfies all. See [library rules](#library-specific-rules).\n- **`target` downlevels, and implies `lib`.** It decides which JS features are rewritten vs left intact, and the default ambient type definitions. Pick the _lowest_ environment you must support.\n- **`module` drives resolution and interop, not just emit.** Even with `noEmit`, TS type-checks against the module format it _would_ emit — so `module` shapes the types you see on imports.\n\n## Runtime decision table\n\n| Runtime                  | `module`                         | `moduleResolution` | `target`                           | `strict` | emit                                                                                      |\n| :----------------------- | :------------------------------- | :----------------- | :--------------------------------- | :------- | :---------------------------------------------------------------------------------------- |\n| Bundler (app)            | `esnext` (or `preserve`)         | `bundler`          | `esnext`, or your bundler's target | `true`   | `noEmit: true` (or `emitDeclarationOnly`)                                                 |\n| Node (compile + run)     | `nodenext`                       | implied `nodenext` | implied `esnext`                   | `true`   | default; `verbatimModuleSyntax: true`                                                     |\n| Library                  | `node18` (lowest Node supported) | implied `node18`   | `es2020` (lowest ES supported)     | `true`   | `declaration`, `declarationMap`, `sourceMap`, `rootDir`, `outDir`, `verbatimModuleSyntax` |\n| Browser-ESM (no bundler) | `nodenext`                       | implied `nodenext` | `esnext` or browser baseline       | `true`   | default, or `noEmit` if another tool emits                                                |\n\nWhy each row:\n\n- **Bundler.** The bundler resolves and emits; TS only type-checks, so `noEmit` and `bundler` resolution (extensionless imports, package `exports`\u002F`imports`). Set `verbatimModuleSyntax: true` (or `isolatedModules`) so single-file transpilers in the pipeline stay safe. Avoid `\"type\": \"module\"` and `.mts` here — some bundlers' ESM\u002FCJS interop can't be modeled under `bundler` resolution (TS issue #54102). Use `preserve` instead of `esnext` only if a file genuinely mixes `import` and `require`.\n- **Node.** `nodenext` picks CJS vs ESM per file from the extension and the nearest `package.json` `\"type\"`, and enforces Node's resolution rules (extensions required on ESM relative imports). For ESM output, set `\"type\": \"module\"` or use `.mts`. Pin a specific Node version by `extends`-ing `@tsconfig\u002FnodeNN` instead of relying on the floating `esnext` target.\n- **Library.** Portable by default: `node18` resolution + `.js` extensions in relative imports work in Node _and_ bundlers. `target`\u002F`module` set to the _lowest_ you support so emitted code and `.d.ts` globals don't assume newer runtimes. See [library rules](#library-specific-rules) for the full strictness\u002Femit set.\n- **Browser-ESM, no bundler.** No dedicated option; `nodenext` ESM rules approximate browser ESM (they enforce extensions). Use `paths` to stand in for import maps — point `https:\u002F\u002Fesm.sh\u002Fpkg` at local `@types`, or map `\"*\"` to an empty file to reject unlisted bare specifiers.\n\n## Implied values (don't set redundantly)\n\nSetting these explicitly is noise and can drift from the option that drives them:\n\n- `module: \"nodenext\"` ⇒ `moduleResolution: \"nodenext\"`, `esModuleInterop: true`, `target: \"esnext\"`\n- `module: \"node20\"` ⇒ `target: \"es2023\"`\n- `module: \"preserve\"` ⇒ `moduleResolution: \"bundler\"`, `esModuleInterop: true`\n- `composite: true` ⇒ `declaration: true`, `incremental: true`, `rootDir` = the tsconfig directory\n- `verbatimModuleSyntax: true` ⇒ `isolatedModules: true`\n- `esModuleInterop: true` ⇒ `allowSyntheticDefaultImports: true`\n- `target` ≥ `ES2022` ⇒ `useDefineForClassFields: true`\n\n## Library-specific rules\n\nLibraries are different: the consumer's config is unknown, so compile under the **strictest** settings — satisfying them tends to satisfy all others.\n\n1. **`strict: true`, especially `strictNullChecks`.** Type-level constructs land in emitted `.d.ts` and only error under strict. `interface Sub extends Super { foo: string | undefined }` is an error _only_ with `strictNullChecks`; a consumer with strict on will hit it. Code rarely errors _only_ when strict is off, so strict is safe to impose.\n2. **Portable imports: write `.js` extensions.** `export * from \".\u002Futils.js\"` works in Node _and_ bundlers; `export * from \".\u002Futils\"` only works in bundlers (infectious). `module: \"node18\"` enforces this.\n3. **`module: \"node18\"`, not `bundler`.** Bundler resolution is infectious — it lets through code that crashes in Node with `ERR_MODULE_NOT_FOUND ... Did you mean to import .\u002Futils.js?`.\n4. **`verbatimModuleSyntax: true`.** Guarantees portability regardless of the consumer's `esModuleInterop` (imports that work only with or only without it are rejected), and blocks `export default` in modules emitted as CommonJS, which would force Node-ESM and bundler consumers to consume the module differently.\n5. **`declaration: true`** emits the `.d.ts` consumers need for types. **`declarationMap` + `sourceMap`** add Go-To-Definition and debugging back to your `.ts` source — only useful if you ship the source; both trade library size for DX, your call.\n6. **`rootDir` + `outDir` separate** (e.g. `src` → `dist`). _Necessary_ if you publish source: without it, extension substitution makes consumers load your `.ts` instead of `.d.ts`, causing type errors and slowdowns.\n7. **Prefer not to bundle.** If you do bundle, your bundler must bundle _declarations_ too — otherwise `.d.ts` files keep extensionless imports that error under a `nodenext` consumer and infect referenced types with `any`. If your bundler can't bundle declarations, use `moduleResolution: \"nodenext\"` so the declarations stay consumer-safe.\n8. **Dual-emit (CJS + ESM from one compile) is not provably type-safe.** A single compilation checks one output; dependencies can expose different APIs to CJS vs ESM. If you dual-emit, test both bundles (`@arethetypeswrong\u002Fcli`) before publishing.\n\n## Project references for monorepos\n\nSplit a large or multi-environment program into smaller projects, each with its own tsconfig, connected with `references`. Gains: faster incremental builds, enforced layering, per-environment options.\n\n- **`references`** — top-level array: `{ \"references\": [{ \"path\": \"..\u002Fsrc\" }] }`. Importing from a referenced project loads its _output_ `.d.ts`, not its source.\n- **`composite: true`** on every referenced project — its implications are in the [implied-values table](#implied-values-dont-set-redundantly); beyond those, it _requires_ every implementation file to be matched by `include` or listed in `files` (tsc names anything missed).\n- **Build with `tsc -b`** (build mode). It builds referenced projects in dependency order, does up-to-date checks, and effectively forces `noEmitOnError` for all projects (otherwise a stale dependency would hide its error after one build). Flags: `--verbose`, `--dry`, `--clean`, `--force`, `--watch`.\n- **`declarationMap: true`** so editors' Go-To-Definition and rename cross project boundaries.\n- **Solution tsconfig** at the root: `\"files\": []` plus `references` to every leaf project. `tsc -b` then builds the whole graph from one entry point. (Empty `files` is allowed once you have ≥1 reference.)\n- **`extends`** a shared base tsconfig to centralize common `compilerOptions`; each leaf overrides only what differs. `files`\u002F`include`\u002F`exclude` are _overwritten_, not merged, by the inheriting config.\n\n## Flags behind the table\n\n- **`strict: true`** turns on the strict family (`strictNullChecks`, `noImplicitAny`, `noImplicitThis`, `strictFunctionTypes`, `strictBindCallApply`, `strictPropertyInitialization`, `strictBuiltinIteratorReturn`, `useUnknownInCatchVariables`, `alwaysStrict`). Default is `true` in modern TS. Full per-flag detail in `OPTIONS.md`.\n- **`verbatimModuleSyntax: true`** — what you write is what's emitted: it errors rather than rewriting `import`↔`require`, forcing intentional CJS vs ESM. Incompatible with dual-emit from one source. Erasure mechanics and deprecated-flag lineage in [`OPTIONS.md`](OPTIONS.md).\n- **`isolatedModules: true`** — flags constructs single-file transpilers (Babel, swc, `ts.transpileModule`) can't handle; implied by `verbatimModuleSyntax`. Detail in [`OPTIONS.md`](OPTIONS.md).\n- **`esModuleInterop: true`** — fixes CJS\u002FAMD\u002FUMD default-import interop; implied by `nodenext`\u002F`preserve`, implies `allowSyntheticDefaultImports` (type-checking only). Helper mechanics in [`OPTIONS.md`](OPTIONS.md).\n\nFor the full strict-family list, interop-flag mechanics, deprecated flags, and `jsx`\u002F`lib`\u002Femit knobs, see [`OPTIONS.md`](OPTIONS.md).\n\n## Symptom → fix\n\n| Symptom                                                                                                                                   | Fix                                                                                                                                                |\n| :---------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ERR_MODULE_NOT_FOUND ... Did you mean to import .\u002Futils.js?`                                                                             | Relative ESM import lacks an extension. Add `.js`. Required under `nodenext`; portable for libraries.                                              |\n| `Cannot find module '.\u002Fsettings.json'`                                                                                                    | Enable `resolveJsonModule`.                                                                                                                        |\n| Default import of a CJS module errors (`import x from \"cjs-mod\"`)                                                                         | Enable `esModuleInterop` (implied by `nodenext`\u002F`preserve`); or use `import * as x`.                                                               |\n| `verbatimModuleSyntax`: `import`\u002F`export` not rewritten to `require`, errors instead                                                      | Use `import x = require(...)` \u002F `export = ...` for CJS; set `package.json` `\"type\"` to match intent.                                               |\n| `Namespaces are not allowed in global script files when 'isolatedModules' is enabled`                                                     | Add `export {}` to the file, or set `moduleDetection: \"force\"`.                                                                                    |\n| `This syntax is not allowed when 'erasableSyntaxOnly' is enabled` (param properties, `enum`, `namespace`, `import =`, `export =`, `\u003CT>x`) | You target Node's native type-stripping. Rewrite the construct, or drop `erasableSyntaxOnly` and use a real transpiler.                            |\n| Re-exporting a type errors under `isolatedModules` \u002F a single-file transpiler                                                             | Mark it: `export { type Foo }` \u002F `import type { Foo }`.                                                                                            |\n| `Cannot find module '...'` on a side-effect import (`import \".\u002Fx.css\"`) after enabling `noUncheckedSideEffectImports`                     | Add `declare module \"*.css\" {}` in a global `.d.ts`.                                                                                               |\n| Consumer gets `any` \u002F declaration errors from a _bundled_ library under `nodenext`                                                        | Your bundler kept extensionless imports in `.d.ts`. Don't bundle the library, or bundle declarations too; else set `moduleResolution: \"nodenext\"`. |\n| `verbatimModuleSyntax` can't be enabled with dual CJS+ESM emit                                                                            | Fundamentally incompatible with one compile emitting both. Emit one format per compile, or drop it.                                                |\n| `allowImportingTsExtensions` can only be used with `noEmit`\u002F`emitDeclarationOnly`                                                         | Set one of those — the bundler emits the JS.                                                                                                       |\n| Library consumer errors under _their_ `strict` but not yours                                                                              | Compile the library with `strict: true`; type-level code leaks into `.d.ts` and only errors under strict (e.g. `strictNullChecks`).                |\n| `exactOptionalPropertyTypes`: `Type 'undefined' is not assignable`                                                                        | Don't assign `undefined` to an optional prop; add `undefined` to its type, or omit the key.                                                        |\n",{"name":5,"metadata":24,"description":7},{"category":25},"reference","main","534498267dccbe415f22f31fceac9da6771c195f","plugins\u002Ftypescript-pro\u002Fskills\u002Ftsconfig","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace","https:\u002F\u002Fj0hanz-marketplace.vercel.app","https:\u002F\u002Fgithub.com\u002Fj0hanz","linus-johansson-cv-d308be9b73e1.herokuapp.com","2026-11-15 02:42:07",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add j0hanz\u002Fj0hanz-marketplace --skill tsconfig",{"tool":40,"command":41},"bunx","bunx skills add j0hanz\u002Fj0hanz-marketplace --skill tsconfig",{"tool":43,"command":44},"pnpm","pnpm dlx skills add j0hanz\u002Fj0hanz-marketplace --skill tsconfig","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript-pro\u002Fskills\u002Ftsconfig\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"OPTIONS.md","REFERENCE","参考文档",8023,"https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript-pro\u002Fskills\u002Ftsconfig\u002FOPTIONS.md",[55,62,69,76,83,90],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7ABP78JFYBMCXJ9GMETCYZM","unslop","Use when writing or editing prose a person will read, or when text sounds AI-generated.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Funslop\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7ABP52BNV7NRPNBR6PCNZWC","show-me","Use when asked to show, diagram, or walk through how code fits together or what a change does, or before explaining a multi-file flow in prose.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Fshow-me\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7ABP3EPN4KFB4HPJNMY31NR","pr","Use when writing or updating a pull request description, or before running `gh pr create`.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Fpr\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7ABP08MXTHPZYTG4HKEP7WQ","commit","Use when writing a commit message, or before running `git commit`.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Fcommit\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7ABNV9J7DN1AFRBGDBHVBY2","write-specs","Spec a feature's observable behavior. Use when asked for requirements, when a request says what the system should do but not how, or to capture what a built system already guarantees. Not for how to build it (write-plan).","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fwrite-specs\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7ABNPK2GVG8EB3SSEAMK4FZ","write-skills","Write, fix, or audit a skill's frontmatter, trigger description, and body. Use when a skill is asked for, never fires, or fires at the wrong moment. Not for a hook (write-hooks) or the plugin manifest and catalog.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fwrite-skills\u002FSKILL.md",[],[]]