Don't Break the Contract: Keep Consistency with Full Stack Type Safety
summary
Argues that sharing a single shared-types module and using TypeScript project references makes API contracts the compiler’s problem: client, server and tests compile against the same types, the build fails when interfaces diverge, and incremental builds avoid republishing packages. Demonstrates a monorepo with client/server/typed-contract, shows compiler errors surfacing mismatches, and mentions toolchains that emit TypeScript from Haskell/Scala so cross-language systems can adopt the same approach.
AI-written summary · about
chapters (9)
- 0:00Start
- 0:49Service-Oriented Architecture
- 3:42Integration Test
- 4:33Integration Tests Are Expensive
- 7:17Project Reference
- 10:46Types Are the Single Source of Truth
- 11:14How To Refine a Small Contract
- 14:12Logical Separation between Components
- 15:04Package Personing
related talks
22mThink you know TypeScript? Think again.
20mBetter Together: Rust & TypeScript
27mMatthew Gerstman - TypeScript: Seeing Past the Hype
27mTake a rest from REST
11mThe Joy of Typescript
38mUnderstanding TypeScript's Structural Type System
30mTypeScript: Seeing Past the Hype
45mType-Safe APIs - Syncing Back & Front End Types w/ Code Generation
