Function knownOrError

  • Returns the known value or throws the provided error when unknown.

    Returns

    The unwrapped known value of type T.

    Type Parameters

    • T

      The type representing the known variants

    Parameters

    • value: Upward<T>

      The possibly Unknown value returned from gRPC.

    • error: string | Error

      Error to throw if value is unknown.

    Returns T

Generated using TypeDoc