typescript-advanced
Installation
SKILL.md
TypeScript Advanced: Patterns, Pitfalls & type-fest
This skill defines the rules, conventions, and architectural decisions for writing advanced TypeScript. It is intentionally opinionated to prevent common type-level bugs and enforce patterns that produce safe, maintainable code.
For detailed API documentation of TypeScript features, use other appropriate tools (documentation lookup, web search, etc.) — this skill focuses on when, why, and how to use advanced type features correctly.
Type Safety Philosophy
any vs unknown vs never — the only rule you need
| Type | Assignable from | Assignable to | Operations | Use for |
|---|---|---|---|---|
any |
anything | anything | all (UNSAFE) | Never in new code |
unknown |
anything | only unknown / any |
none unnarowed | External inputs, JSON, user data |
never |
nothing | anything | none | Exhaustive checks, unreachable code |