Introduction
The never type helps us catch code that should never happen. It also shows when some parts of the code can never run.
When a function always throws an error and never returns a value.
When you want to mark a part of code that should never be reached, like a default case in a switch.
When TypeScript can tell some code is unreachable and you want to understand why.
When you want to make your code safer by catching impossible cases.