You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type Safety First: Leverage TypeScript's type system to catch errors at compile time
Explicit Over Implicit: Prefer explicit type annotations when they improve code clarity
Consistency: Follow existing codebase patterns and project conventions
Type Definitions
Interfaces vs Types
Use interface for object shapes that may be extended
Use type for unions, intersections, primitives, and computed types
Prefer interface for public APIs and extensible contracts
// ✅ Good - interface for extensible objectsinterfaceUser{id: stringname: string}// ✅ Good - type for unions and computed typestypeStatus='pending'|'approved'|'rejected'typeUserWithStatus=User&{status: Status}
Import/Export Conventions
File Extensions
All relative imports must include .js extensions for ESM compatibility
Use explicit extensions even in TypeScript files for build tool compatibility