Narrows an unknown value to instance of constructor type T if it is type-compatible, or raises an error otherwise.
unknown
T
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 instance of constructor typeT
if it is type-compatible, or raises an error otherwise.