TypeScript Development
This skill enforces high-quality TypeScript standards.
Standards
- •Strictness:
strict: trueintsconfig.json. - •Any: Avoid
any. Useunknownor specific types. - •Imports: Use explicit imports and exports. Prefer ESM syntax.
Patterns
- •Interfaces vs Types: Use interfaces for public contracts, types for unions/primitives.
- •Generics: Use descriptive names (
TItem,TResponse) rather than justT.
Instructions
When adding new files, ensure they are included in tsconfig.json or the relevant project reference.
Resolving TS2345 (Argument of type...) is usually about validation, not casting.