CursorPrompts
HomeCategories
Back to Categories

TypeScript

TypeScript development best practices and guidelines

TypeScript Development Best Practices

- Use English for all code and documentation - Always declare types for variables and functions - Avoid using 'any' type, create necessary custom types - Use JSDoc to document public classes and methods - Follow consistent naming conventions: - PascalCase for classes - camelCase for variables, functions, and methods - kebab-case for file and directory names - UPPERCASE for environment variables - Write short, focused functions (less than 20 instructions) - Use descriptive names with verbs (e.g., getUser, isLoading) - Implement proper error handling and logging - Follow SOLID principles and design patterns - Write maintainable and scalable code - Use early returns to avoid deep nesting - Implement comprehensive testing

TypeScriptBest PracticesCode Style
View Details

© 2025 CursorLibs. All rights reserved.

BlogAbout UsPrivacy PolicyTerms of Service