Use the never type to avoid code with dead ends using TypeScript

Share this video with your friends

Send Tweet

Programming language design does have a concept of bottom type that is a natural outcome as soon as you do code flow analysis. TypeScript does code flow analysis (😎) and so it needs to reliably represent stuff that might never happen. This is what the never type is all about.