~/talk

Nothing Generic About It

Talkat WFH Conf 2020 · on Thursday, 2020-03-26· [typescript, frontend-architecture]
slides:none on file

Explains how generics actually behave: identity functions and constrained generics, map types that implement Partial/Pick under the hood, and conditional types with infer to unwrap a Promise used to extract argument and prop tuples. Shows runtime-plus-type patterns: tight narrowing, using unknown vs any to avoid turning off the checker, and a small assertExhaustive that makes enums exhaustive technique that produces compiler errors when cases are added. Includes React prop and Redux slice examples and HOC/currying notes and the practical limits of TypeScript.

AI-written summary · about

  1. 0:00Start
  2. 14:58HOW DO WE DETERMINE MORE ADVANCED TYPES?
  3. 15:09DYNAMIC CHECKS GIVE US INFORMATION ABOUT VALUES AT RUN- TIME
  4. 15:37STRUCTURALLY TYPED
  5. 16:35WE CAN USE THOSE STRUCTURAL TYPES TO DERIVE OTHER TYPES
  6. 17:11UNION TYPES
  7. 19:34TRANSITIVE PROPERTIES
  8. 21:31GENERICS ARE LIKE PASSING A TYPE AS AN ARGUMENT
  9. 22:36REAL WORLD GENERICS
  10. 22:55CONSTRAINTS
  11. 23:39INDEX IN THE TYPE LAYER
  12. 29:27INFERENCE TYPES
  13. 29:46USE NEVER TO TELL TYPESCRIPT SOMETHING IS BROKEN
~/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.