TS Best Practices Functional

This skill should be used when the user wants to refactor TypeScript code to functional patterns or write new code following functional doctrine. Common triggers include "make this functional", "remove the class", "use Result instead of throw", "stop mutating this", and "refactor to factory function". Bakes in factory functions over classes, Result<T,E> over exceptions, immutable state via spread/map/filter, and pure functions composed in pipelines. Skip when the user wants general TS hygiene (use ts-best-practices), the class wraps a stateful SDK (PrismaClient, Octokit, WebSocket), or a framework requires a class.

zrosenbauer 867362b 3 files · 15.7 KB Updated

File contents

zrosenbauer/skills/tree/main/skills/ts-best-practices-functional commit 867362bcc3

Frequently asked questions

npx skillmds@latest add zrosenbauer/ts-best-practices-functional