Building Type-Safe API Clients From OpenAPI Schemas
Stop hand-maintaining API interfaces that drift from the backend — generate them from OpenAPI and turn breaking changes into compile errors.
Tag
8 articles
Stop hand-maintaining API interfaces that drift from the backend — generate them from OpenAPI and turn breaking changes into compile errors.
A practical walkthrough of the compiler flags beyond strict: true that catch real bugs, plus how to adopt them on a large legacy codebase.
Learn why satisfies beats plain annotations and as const for config-like objects, keeping literal types intact while still checking shape.
any, unknown, and never look like the same category of weird type but do opposite jobs — here's when each one is actually the right choice.
A tour of how TypeScript actually narrows types through your control flow, from typeof guards to custom predicates, and where narrowing quietly breaks.
Template literal types can enforce structure in strings like event names, route params, and object paths — and know exactly where to stop using them.
Partial, Pick, and Readonly aren't compiler magic — learn the conditional and mapped types they're built from, and use them to write your own.
Generics keep the type information any throws away — how to write them, constrain them with extends, and know when a plain union is the better call.