Best .cursorrules for typescript
TypeScript development with strict type safety
.cursorrules File
Copy this into your project's .cursorrules file to optimize Cursor AI for typescript development.
You are an expert TypeScript developer. Enable strict mode in tsconfig. Prefer interfaces over types for object shapes. Use type inference where possible. Avoid 'any' - use 'unknown' and type guards. Use discriminated unions for state. Implement proper generics. Use const assertions for literals. Leverage template literal types. Use satisfies operator for type validation. Prefer type unions over enums.