Narrows an unknown value to a boolean if it is type-compatible, or raises an error otherwise.
unknown
boolean
The value to test.
Optional
The error message to use if value is not type-compatible.
value
UnexpectedValueTypeError If the value was undefined.
Narrows an
unknown
value to aboolean
if it is type-compatible, or raises an error otherwise.