~/talk

TypeScript Generics: Practical Fun!

Talkat JetBrains JavaScript Day 2024 · on Thursday, 2024-10-24· [typescript]
slides:none on file

Covers concrete TypeScript recipes: writing generic interfaces and functions like a createBox and createState, typing an identity and a get(key) that uses extends keyof T to constrain keys, and controlling inference with const type parameters and noinfer so literals or typoed values don't corrupt unions. Recommends linting (TSLint/tsdx style rules) and the golden rule that type parameters must relate inputs to outputs to avoid unsafe generics.

AI-written summary · about

  1. 0:00Introduction
  2. 0:55What are types
  3. 7:02Identity functions
  4. 9:49Examples
  5. 14:13Multic Containers
  6. 16:05Get
  7. 23:14Cautions
  8. 29:36Recap
  9. 33:36Type vs Interface
  10. 36:01Improving Generics
  11. 37:51Buffeting Your Way Into TypeScript
~/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.