Category
JavaScript & TypeScript
6 articles on javascript & typescript.
Discriminated Unions: The TypeScript Pattern I Reach For Most
Discriminated unions turn impossible states into compile errors. The single TypeScript pattern that has removed the most bugs from my code, with real examples.
TypeScript Generics, From Confusing to Comfortable
Generics are where TypeScript stops being JavaScript with types. A practical, example-first guide to generic functions, constraints, and inference.
Stop Throwing Strings: Typed Error Handling in TypeScript
try/catch loses type information the moment an error is thrown. Here is how I handle errors in TypeScript with typed errors and Result types.
Drizzle vs Prisma in 2026: Which TypeScript ORM Should You Choose?
A senior engineer's honest 2026 comparison of Drizzle and Prisma: type-safety, edge cold starts, migrations, relational queries, and a clear pick-this-if framework.
Zod in Production: Validating at the Edges of Your App
Types vanish at runtime, and external data lies. How I use Zod to validate at every boundary, env vars, API input, webhooks, so bad data fails loudly and early.
TypeScript Utility Types You Should Actually Know
TypeScript ships a toolbox of utility types that delete boilerplate. The ones I use every week, with the real scenarios where each one earns its place.