@praha/byethrow
    Preparing search index...

    Type Alias InferSuccess<T>

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

    Infers the Success value type T from a Result or a function returning a Result.

    Type Parameters

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

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

    const fn = () => Promise.resolve({ type: 'Success', value: 123 } as const);
    type SuccessValue = Result.InferSuccess<typeof fn>; // number