~/talk

Learning to Love Type Systems

Talkat dotJS 2018 · on Friday, 2018-11-09· [typescript]

Claims that types reduce bugs by constraining domains with concrete examples: a divide-by-two function failing on null/undefined, fixed by annotating x:number so it is total at compile time; a fetchUser that becomes Promise<Either<Error,User>> so failures are values not thrown exceptions; querySelector wrapped in an Option to eliminate undefined. Demonstrations run in the console, tests show many inputs that previously errored now produce typed results, and TypeScript 2.8 conditional types plus Either/Option wrappers make functions total are the practical tools shown.

AI-written summary · about

  1. 0:00Intro
  2. 5:33Overview
  3. 7:24Functions
  4. 10:29Totality
~/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.