Appearance
function neverGuard(x: never, msg: string): Error;
Create an Error for an unexpected value. The never parameter helps TypeScript check exhaustive branches. This function returns the Error; it does not throw it.
never
x
msg
string
Error