~/talk

How to model your crazy data in TypeScript

Talkat GrillJS 2019 · 2019-09-07..09-08· [typescript, developer-experience]
slides:none on file

Practical patterns for taming messy API shapes: concrete examples of discriminated unions and reusable type guards, a small version<T, N> helper to evolve API types without copy‑paste, using keyof + indexed types and mapped types to derive nested feature/flag shapes, tuple typing for row arrays, and when to prefer unknown vs any. Demos include real TypeScript snippets, pitfalls with const enums and .d.ts files, and which helpers compile to useful runtime values versus declaration‑only artifacts.

AI-written summary · about

  1. 0:00Introduction to TypeScript
  2. 3:24Modeling data with TypeScript
  3. 4:13Challenges with product models
  4. 9:16Handling API versioning
  5. 14:25Avoiding type pollution
  6. 18:26Advanced type helpers
  7. 20:30Nested data structures
  8. 23:07Working with tuples
  9. 23:28Using unknown vs any
  10. 27:34Enums and their pitfalls
  11. 31:15Where to place types
  12. 35:46Best practices summary
  13. 37:11Q&A and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.