Function assertNonNullable

  • Asserts that the value is not undefined or null. Similar to ! or NonNullable, but also performs the check at runtime.

    Type Parameters

    • T

    Parameters

    • value: T

      The value to check and return.

    Returns NonNullable<T>

    The given value.

    If value === undefined || value === null.