onrails
    Preparing search index...

    Type Alias FluentResultAsync<T, E>

    Opt-in dot chaining over ResultAsync

    type FluentResultAsync<T, E> = {
        andThen: <U>(
            fn: (value: T) => ResultAsync<U, E>,
        ) => FluentResultAsync<U, E>;
        chain: <U>(fn: (value: T) => ResultAsync<U, E>) => FluentResultAsync<U, E>;
        flatMap: <U>(
            fn: (value: T) => ResultAsync<U, E>,
        ) => FluentResultAsync<U, E>;
        map: <U>(fn: (value: T) => U) => FluentResultAsync<U, E>;
        mapErr: <F>(fn: (error: E) => F) => FluentResultAsync<T, F>;
        match: <U>(onOk: (value: T) => U, onErr: (error: E) => U) => Promise<U>;
        resultAsync: ResultAsync<T, E>;
    }

    Type Parameters

    • T
    • E
    Index

    Properties

    andThen: <U>(fn: (value: T) => ResultAsync<U, E>) => FluentResultAsync<U, E>
    chain: <U>(fn: (value: T) => ResultAsync<U, E>) => FluentResultAsync<U, E>
    flatMap: <U>(fn: (value: T) => ResultAsync<U, E>) => FluentResultAsync<U, E>
    map: <U>(fn: (value: T) => U) => FluentResultAsync<U, E>
    mapErr: <F>(fn: (error: E) => F) => FluentResultAsync<T, F>
    match: <U>(onOk: (value: T) => U, onErr: (error: E) => U) => Promise<U>
    resultAsync: ResultAsync<T, E>