Typing Beyond Code: Agreements Between Layers
summary
Describes applying TypeScript-style typing beyond code boundaries in a frontend layered architecture: typing routing models with inferred params, exporting design tokens and icons safely from Figma, checking CSS Modules/variables, typing i18next, ENV configs, feature flags, API contracts and MobX as a central layer. Covers which tasks TypeScript handles natively vs where custom scripts, extended library types and extra tools were needed, shows runtime demos, and discusses scalability limits when excessive typed information slows compilation/linting and engineering practices to mitigate that.
AI-written summary · about
chapters (23)
- 0:00Introduction
- 2:10Typization matters
- 4:39Common Utils layer
- 6:46Design and code boundary
- 8:14CSS tokens in Figma
- 10:05CSS variables without TS
- 12:15Typed CSS Modules
- 13:58Source maps for styles
- 15:42Canvas and theme tokens
- 16:24Typed Playwright locators
- 18:30API contracts and adapters
- 20:40MobX stores with TS
- 22:48Base Store with generics
- 24:14React Query integration
- 25:42Safe routing with types
- 28:12Simplified router setup
- 30:23TypeScript performance impact
- 32:04Storybook mocks with MobX
- 33:08Typed i18n keys
- 37:12Icon fonts from Figma
- 39:18Feature toggles and types
- 41:48TypeScript memory costs
- 42:51Summary
