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’spackage.json using the workspace:* protocol:
tsconfig.json.
Presets
- base.json
- nextjs.json
- react-library.json
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:| Option | Value | Why it matters |
|---|---|---|
strict | true | Enables the full TypeScript strict suite: strictNullChecks, strictFunctionTypes, noImplicitAny, and more. |
noUncheckedIndexedAccess | true | Array and record index access returns T | undefined rather than just T, preventing runtime errors from out-of-bounds reads. |
isolatedModules | true | Ensures each file can be safely transpiled in isolation (required for tools like esbuild, SWC, and Babel). |
moduleResolution | NodeNext | Uses the modern Node.js ESM resolution algorithm, supporting package.json exports fields. |
module | NodeNext | Emits native ES modules with .js import extensions, matching Node 18+ expectations. |
target | ES2022 | Outputs 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 + declarationMap | true | Emits .d.ts files and their source maps so consumers get accurate Go-to-Definition navigation. |
incremental | false | Disabled to avoid stale build caches in CI environments. |
Type Checking
Runtsc --noEmit across all workspaces in one command from the monorepo root:
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:
