@book000/pixivts - v0.61.1
    Preparing search index...

    Interface ErrResult<E>

    Failed result carrying error.

    interface ErrResult<E> {
        error: E;
        isErr: true;
        isOk: false;
        andThen<U, F>(_fn: (value: never) => Result<U, F>): ErrResult<E>;
        map<U>(_fn: (value: never) => U): ErrResult<E>;
        mapErr<F>(fn: (error: E) => F): ErrResult<F>;
        match<U>(_onOk: (value: never) => U, onErr: (error: E) => U): U;
        unwrapOr<T>(fallback: T): T;
    }

    Type Parameters

    • E
    Index

    Properties

    error: E

    The error value.

    isErr: true

    Always true — use this to narrow the union to ErrResult<E>.

    isOk: false

    Always false — use this to narrow the union to ErrResult<E>.

    Methods

    • Calls onErr and returns its result.

      Type Parameters

      • U

      Parameters

      • _onOk: (value: never) => U
      • onErr: (error: E) => U

      Returns U