@praha/byethrow
    Preparing search index...

    Type Alias Result<T, E>

    Result: Success<T> | Failure<E>

    A union type representing either a success or a failure.

    Type Parameters

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

    const doSomething = (): Result.Result<number, string> => {
    return Math.random() > 0.5
    ? { type: 'Success', value: 10 }
    : { type: 'Failure', error: 'Oops' };
    };