AgentSkillsCN

Typescript

TypeScript

SKILL.md

TypeScript Skill

When writing TypeScript code:

  • Use strict typing, avoid any and as type assertions
  • Prefer interface over type for object shapes
  • Use discriminated unions for state management
  • Prefer const over let, never use var
  • Use async/await over raw promises
  • Handle errors explicitly with try/catch or Result types