typescript
Installation
SKILL.md
TypeScript
TypeScript-specific guidelines for type safety and code organization.
Quick Reference
Do
- Use
import typefor type-only imports - Use
{ cause }when re-throwing errors - Let TypeScript infer types when obvious
- Create factory functions with
create*prefix - Prefer factory functions over classes
- Return
nullfrom handlers when request doesn't match - Use a logger instead of
console.log - Validate external data at runtime (fetch, filesystem, env vars, user input) with an existing validation library