functional-constructs-types
Installation
SKILL.md
Use Functional Constructs and Libraries to Help Types Flow
Overview
Functional programming constructs (map, filter, reduce) work better with TypeScript than imperative loops.
TypeScript's type inference works particularly well with functional constructs. They produce intermediate types that flow naturally, whereas loops require you to manually track types.
When to Use This Skill
- Building arrays with for loops
- Transforming data structures
- Types not flowing through imperative code
- Choosing between loops and functional methods