Function defined

  • 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.

    Type Parameters

    • T

    Parameters

    • Optional x: T
    • code: string = 'undefined'
    • message: string = ''

    Returns T