Typescript Coding Style

Applies Jack Moore's personal TypeScript/TSX coding style — derived from his own pre-2025 open-source code and gists, not a generic style guide. Use this whenever writing, generating, refactoring, or reviewing TypeScript or TSX code: new functions, modules, types, React components, hooks, API handlers, utility libraries, or any code-generation task in a TS/TSX file. Trigger even when the user doesn't explicitly ask for "my style" — it should shape ordinary TypeScript work by default. Key signals: declarative composition over loops, object-param destructuring instead of positional args, plain factory functions over classes, discriminated unions and exhaustive `match` for state, errors modeled as values (Result/Option) instead of scattered try/catch, erasable syntax (no enums/access modifiers/decorators), fully spelled-out identifiers, and minimal comments. Always defers to a project's existing conventions first (lint config, prevailing patterns, framework requirements like NestJS decorators) — this skill fills

jtmthf 991c471 4 files · 27.4 KB Updated

File contents

jtmthf/skills/tree/main/skills/typescript-coding-style commit 991c471210

Frequently asked questions

npx skillmds@latest add jtmthf/typescript-coding-style