typescript-satisfies-operator
Installation
SKILL.md
TypeScript satisfies
Goal
Validate that a value matches a type without replacing the value's inferred type.
Rules
- Use
satisfieswhen value specificity should win. - Use
: Typewhen the variable should have the wider type. - Use
as const satisfiesfor readonly literal config. - Avoid
as Typeunless it is a deliberate escape hatch. - Use
Record<Union, Value>withsatisfiesfor exhaustive maps.