Typescript

JavaScript & TypeScript best-practices and rule enforcement — JS idioms (naming, `this`-handling, module structure, nullability, iteration performance) and TS-specific type safety, runtime validation, and error handling. Routes to type-system and Zod sub-skills and `object-oriented-programming` for design patterns and SOLID. TRIGGER when: language (TypeScript, TS, .ts, .tsx, JavaScript, JS, .js, .mjs, .cjs, Node.js, browser JS, ESM, CommonJS), type-system (discriminated unions, generics, utility types, make illegal states unrepresentable, type narrowing, variance, contravariance), safety (strict mode, any vs unknown, ts-expect-error, ts-ignore, type assertions, noUncheckedIndexedAccess, noImplicitReturns), runtime (Zod, schema validation, runtime type checks, parse/safeParse), errors (error handling without throwing, union return errors, Result type), ts-conventions (readonly modifier, return type annotations, module organization, namespace, export default, interface prefix, `.d.ts`, ambient declaration, decl

bsene ec88560 14 files · 40.7 KB Updated

File contents

bsene/skills-old/tree/main/typescript commit ec88560b7f

Frequently asked questions

npx skillmds@latest add bsene/typescript