TypeScript Configuration
Add a concise value statement that captures reader interest and previews content value. Focus on benefits while keeping it under two lines. Align with your blog categories.
## Project References
We use TypeScript project references to maintain type safety across packages:
```json
// packages/blocks/tsconfig.json
{
"compilerOptions": {
"composite": true
},
"references": [
{ "path": "../types" },
{ "path": "../primitives" }
]
}
```
This ensures that when you change a type in the types package, TypeScript immediately flags any components that need updating.
## Path Aliases
Clean imports using TypeScript path mapping:
```typescript
// Instead of: import { Button } from "../../../primitives/Button"
import { Button } from "@repo/primitives"
```
## Strict Mode
All packages use strict TypeScript settings for maximum safety:
- strict: true
- noUncheckedIndexedAccess: true
- noImplicitReturns: true
