The Making of a TypeScript Feature: Inferring Type Predicates
effectivetypescript.com