The DOM Is Lying to Your Types
Every TypeScript project trusts lib.dom.d.ts, but it isn't written by hand: a generator turns web specifications into types, and that translation is where bugs hide. Optional parameters that throw, iterables typed as arrays, return types lost on the way. I fix these bugs upstream in Microsoft's generator. In this talk, I show how WebIDL becomes TypeScript, why the spec and not MDN is the source of truth, how to prove a DOM type is wrong, and how a fix travels from a pull request to your editor.
