{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "module": "ESNext",
    "moduleResolution": "bundler",
    "jsx": "react-jsx",
    /* No `baseUrl` — it is deprecated in TypeScript 6. `paths` without it
       resolves relative to this file, which is what we want anyway. */
    "paths": {
      "@/*": ["./src/*"]
    },

    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
    "verbatimModuleSyntax": true,
    "isolatedModules": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,

    /* tsup emits the JS and the .d.ts files, so tsc only ever type-checks.
       `allowImportingTsExtensions` is deliberately absent — it is incompatible
       with declaration emit and would break the published types.

       `declaration` is deliberately NOT set here. It lives in
       tsconfig.build.json, which is the program that actually produces the
       published types. Turning it on for *this* program adds declaration
       portability checking to stories and tests, and a story's inferred `meta`
       reaches into transitive packages (storybook's `PartialStoryFn`,
       rc-select's `Placement`, …). Under pnpm those resolve through
       `node_modules/.pnpm/<pkg>@<hash>/…` paths that cannot be named, so every
       story fails with TS2883 — on pnpm only, while npm's flat tree passes.
       Stories and tests are never published, so the check has nothing to
       protect here. */
    "noEmit": true,
    "types": ["vitest/globals", "@testing-library/jest-dom"]
  },
  "include": [
    "src",
    "test",
    "scripts",
    "vitest.config.ts",
    "tsup.config.ts"
  ]
}
