~/talk

Pushing the Compiler to the Limit

Talkat TSConf 2020 · on Friday, 2020-10-09· [typescript, databases]
slides:none on file

Prisma Client becomes a fully type-safe TypeScript database client by combining conditional and mapped types with a required-keys utility that distinguishes optional from required fields so compile-time types match runtime behavior. The implementation handles real schemas (350 models, ~5,000 fields), shrinks declarations from ~560k to ~309k lines, and speeds generation from 26s to ~4.5s by switching to direct dts/js generation and runtime bootstrapping of implementation, plus a mapped-type error for disallowed optional selections.

AI-written summary · about

  1. 0:00Start
  2. 3:55Essential question
  3. 13:16After generate optimization
  4. 15:05Optimizations Summary
~/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.