Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Codefied-CodePix/KaroCar-platform/llms.txt

Use this file to discover all available pages before exploring further.

@repo/typescript-config provides three TypeScript configuration presets consumed across all KaroCar Platform workspaces, ensuring consistent compiler options, strict type checking, and ES2022 targeting throughout the monorepo. Each workspace’s tsconfig.json extends one of these presets and optionally overrides only what is specific to that workspace, keeping the root-level options in sync automatically.
@repo/typescript-config is marked "private": true in its package.json and is not published to npm. It is consumed exclusively as an internal workspace dependency.

Installation

Reference the package from any workspace’s package.json using the workspace:* protocol:
"devDependencies": {
  "@repo/typescript-config": "workspace:*"
}
Then extend one of the three presets from that workspace’s tsconfig.json.

Presets

base.json — Foundation for All TypeScript

The root preset inherited by both nextjs.json and react-library.json. It can also be extended directly by any non-framework TypeScript package (e.g., utility libraries, server-side workers, API routes).Full source:
{
  "$schema": "https://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "incremental": false,
    "isolatedModules": true,
    "lib": ["es2022", "DOM", "DOM.Iterable"],
    "module": "NodeNext",
    "moduleDetection": "force",
    "moduleResolution": "NodeNext",
    "noUncheckedIndexedAccess": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "strict": true,
    "target": "ES2022"
  }
}
Key compiler options explained:
OptionValueWhy it matters
stricttrueEnables the full TypeScript strict suite: strictNullChecks, strictFunctionTypes, noImplicitAny, and more.
noUncheckedIndexedAccesstrueArray and record index access returns T | undefined rather than just T, preventing runtime errors from out-of-bounds reads.
isolatedModulestrueEnsures each file can be safely transpiled in isolation (required for tools like esbuild, SWC, and Babel).
moduleResolutionNodeNextUses the modern Node.js ESM resolution algorithm, supporting package.json exports fields.
moduleNodeNextEmits native ES modules with .js import extensions, matching Node 18+ expectations.
targetES2022Outputs modern JavaScript; no unnecessary down-compilation for runtimes that already support ES2022.
lib["es2022", "DOM", "DOM.Iterable"]Includes type definitions for ES2022 builtins, the browser DOM, and iterable DOM collections.
declaration + declarationMaptrueEmits .d.ts files and their source maps so consumers get accurate Go-to-Definition navigation.
incrementalfalseDisabled to avoid stale build caches in CI environments.

Type Checking

Run tsc --noEmit across all workspaces in one command from the monorepo root:
# Via pnpm
pnpm check-types

# Via Turbo (with caching and correct dependency order)
turbo run check-types
Each workspace’s check-types script calls tsc --noEmit, which validates types against its extended preset without producing any output files. Turbo respects the workspace dependency graph, so shared packages are type-checked before the apps that consume them. Run type checking for a single workspace:
pnpm --filter @karo-car/web check-types
Type checking is one part of the broader code-quality pipeline. See the Linting and Formatting guide for how check-types, ESLint, and Prettier work together in the CI workflow.

Build docs developers (and LLMs) love