@haykal/tsconfig
v1.0.0
Published
Shared TypeScript configuration templates for the Haykal monorepo.
Readme
@haykal/tsconfig
Shared TypeScript configuration templates for the Haykal monorepo.
Available Templates
| Template | File | Use Case |
| ------------- | ---------------- | ------------------------------- |
| backend | backend.json | NestJS backend packages |
| shared | shared.json | Shared types/constants packages |
| client | client.json | Client SDK packages |
| ui-web | ui-web.json | Next.js/React web packages |
| ui-mobile | ui-mobile.json | React Native/Expo packages |
Usage
In your package's tsconfig.json:
{
"extends": "@haykal/tsconfig/backend.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.spec.ts"]
}Template Details
Backend (backend.json)
experimentalDecorators: true- Required for NestJSemitDecoratorMetadata: true- Required for NestJS DImodule: nodenext- Node.js ESM support- All strict mode flags enabled
Shared (shared.json)
- Pure TypeScript, no decorator support
module: nodenext- Compatible with all consumers- All strict mode flags enabled
Client (client.json)
- Similar to shared, optimized for SDK packages
module: nodenext- Node.js compatible
UI Web (ui-web.json)
jsx: react-jsx- React 17+ JSX transformmodule: esnextwithbundlerresolution- DOM lib types included
UI Mobile (ui-mobile.json)
jsx: react-native- React Native JSXmodule: esnextwithbundlerresolution
