Check that x is of type T and not undefined. If x is undefined, throw a RuntimeError with the optionally provided error code and message.
x
T
undefined
Optional
Check that
x
is of typeT
and notundefined
. Ifx
isundefined
, throw a RuntimeError with the optionally provided error code and message.