From fe08db1e95eeccb95ad796c79d50642e8b8b0bc6 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Tue, 19 Aug 2025 19:55:33 -0600 Subject: [PATCH] doc: Fix a remaining merge. --- .../rules/development/type_safety_guide.mdc | 27 +------------------ 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/.cursor/rules/development/type_safety_guide.mdc b/.cursor/rules/development/type_safety_guide.mdc index faee146b..9c23938a 100644 --- a/.cursor/rules/development/type_safety_guide.mdc +++ b/.cursor/rules/development/type_safety_guide.mdc @@ -44,7 +44,7 @@ Practical rules to keep TypeScript strict and predictable. Minimize exceptions. ## Type Safety Enforcement ### Core Type Safety Rules -<<<<<<< HEAD + - **No `any` Types**: Use explicit types or `unknown` with proper type guards - **Error Handling Uses Guards**: Implement and reuse type guards from `src/interfaces/**` - **Dynamic Property Access**: Use `keyof` + `in` checks for type-safe property access @@ -58,31 +58,6 @@ Practical rules to keep TypeScript strict and predictable. Minimize exceptions. - **Avoid Type Assertions**: Replace `as any` with proper type guards and interfaces - **Narrow Types Properly**: Use type guards to narrow `unknown` types safely - **Document Type Decisions**: Explain complex type structures and their purpose -======= - -- **No `any` Types**: Use explicit types or `unknown` with proper type guards -- **Error Handling Uses Guards**: Implement and reuse type guards from - `src/interfaces/**` -- **Dynamic Property Access**: Use `keyof` + `in` checks for type-safe - property access - -### Type Guard Patterns - -- **API Errors**: Use `isApiError(error)` guards for API error handling -- **Database Errors**: Use `isDatabaseError(error)` guards for database - operations -- **Axios Errors**: Implement `isAxiosError(error)` guards for HTTP error - handling - -### Implementation Guidelines - -- **Avoid Type Assertions**: Replace `as any` with proper type guards and - interfaces -- **Narrow Types Properly**: Use type guards to narrow `unknown` types - safely -- **Document Type Decisions**: Explain complex type structures and their - purpose ->>>>>>> master ## Minimal Special Cases (document in PR when used)