Best practices and patterns for using GitHub Copilot with TypeScript projects.
# GitHub Copilot TypeScript Rules
## Type Safety
- Enable strict mode
- Avoid any type
- Use generics appropriately
- Define proper interfaces
## Documentation
- Use JSDoc comments
- Document public APIs
- Include usage examples
- Explain complex types
## Patterns
- Use discriminated unions
- Implement type guards
- Leverage utility types
- Create reusable type helpers
## Project Setup
```json
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true
}
}
```Cursor rules for TypeScript with strict type checking, advanced patterns, and best practices.
Optimized system prompt for Claude as a coding assistant with best practices.
Optimize GitHub Copilot suggestions for React and TypeScript development.
Copilot
general
AI coding rules customize how GitHub Copilot generates and refactors code for your project. Follow these steps to install GitHub Copilot TypeScript.
.cursor/rules, for Windsurf use .windsurfrulesCursor rules for TypeScript with strict type checking, advanced patterns, and best practices.
Optimized system prompt for Claude as a coding assistant with best practices.
Optimize GitHub Copilot suggestions for React and TypeScript development.