@praha/byethrow
    Preparing search index...

    Type Alias ResultAsync<T, E>

    ResultAsync: Promise<Result.Result<T, E>>

    An asynchronous variant of Result, wrapped in a Promise.

    Type Parameters

    import { Result } from '@praha/byethrow';

    const fetchData = async (): Result.ResultAsync<string, Error> => {
    try {
    const data = await fetch('...');
    return { type: 'Success', value: await data.text() };
    } catch (err) {
    return { type: 'Failure', error: err as Error };
    }
    };