TypeScript · Type Narrowing · Senior · Live Coding
Assertion functions (asserts)?
Short Interview Answer
Functions that throw and tell TS a condition is true afterward.
Detailed Explanation
Useful for shared assertDefined helpers. Must actually throw on failure.