dev-typescript
Installation
SKILL.md
TypeScript Best Practices
Non-Negotiables
- Strict mode is on — never weaken
tsconfig.json(no"strict": false, no looseningnoImplicitAny) - Never use
any— useunknownand narrow it, or find the actual type - No
@ts-ignore— use@ts-expect-errorwith a comment justifying why, if truly unavoidable - No
Function,Object, or{}as types — use specific signatures/interfaces
// BAD
function run(fn: Function) { fn() }
const data: Object = {}
// GOOD
function run(fn: () => void) { fn() }
const data: Record<string, unknown> = {}