~/talk

How to Break TypeScript (and How to Put it Back Together)

Talkat NDC London 2017 · 2017-01-16..01-20· [typescript]
links:none on file
slides:none on file

Demonstrates a concrete TypeScript program where a variable of type RegisteredUser|AnonymousUser is narrowed by an instanceof check via flow-sensitive type refinement, then reassigned to the other variant and later refactored into a helper so the compiler loses the refinement; the type checker accepts the first form but rejects the refactored one even though runtime behavior is identical. Shows proposed fixes — require new variables (C# style), add full Hoare logic (pre/postconditions), or enforce immutability — and cites Anders Hejlsberg warning that deeper analysis is costly and brittle.

AI-written summary · about

  1. 0:00Introduction to TypeScript
  2. 1:45Analyzing type refinement
  3. 5:25Language design trade-offs
  4. 6:46Historical context
  5. 6:58Software engineering lessons
  6. 11:54Closing remarks
~/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.