Type-safe error handling patterns in TypeScript
.cursorrules in your project rootHandle errors with types: 1. Create custom error classes 2. Use Result/Either types for operations 3. Type catch clause variables properly 4. Implement error type hierarchies 5. Use branded types for error codes 6. Create union types for expected errors 7. Document error types in JSDoc 8. Avoid any in error handling
Comprehensive Cursor rules for Next.js 14+ with App Router, including routing, layouts, and API patterns.
Cursor rules for TypeScript with strict type checking, advanced patterns, and best practices.
Cursor rules for Tailwind CSS development with responsive design, custom components, and dark mode.
Cursor
language
AI coding rules customize how Cursor generates and refactors code for your project. Follow these steps to install TypeScript Error Handling Types.
.cursor/rules, for Windsurf use .windsurfrulesComprehensive Cursor rules for Next.js 14+ with App Router, including routing, layouts, and API patterns.
Cursor rules for TypeScript with strict type checking, advanced patterns, and best practices.
Cursor rules for Tailwind CSS development with responsive design, custom components, and dark mode.