@praha/byethrow
    Preparing search index...

    Type Alias InferFailure<T>

    InferFailure: [T] extends [(...args: any[]) => ResultMaybeAsync<any, infer U>]
        ? U
        : [T] extends [ResultMaybeAsync<any, infer U>] ? U : never

    Infers the Failure value type E from a Result or a function returning a Result.

    Type Parameters

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

    type R = Result.Result<number, string>;
    type ErrorValue = Result.InferFailure<R>; // string
    import { Result } from '@praha/byethrow';

    const fn = () => Promise.resolve({ type: 'Failure', error: new Error() } as const);
    type ErrorValue = Result.InferFailure<typeof fn>; // Error