What it does
A general Cursor rules file for TypeScript code. It covers the type system, naming, code organisation, functions and error handling. Examples include preferring interfaces for objects, using unknown instead of any, strict mode, type guards and custom error types.
Use cases
- 01Replace any with unknown and type guards
- 02Keep naming consistent for types, variables and constants
- 03Add custom error types for domain-specific failures