Resolves to the appropriate Result type (sync or async) based on the input type.
Typically used to conditionally infer return types based on whether the original computation was async.
The reference type to inspect for a Promise.
The type of the Success value.
The type of the Failure value.
import { Result } from '@praha/byethrow';type R = Result.ResultAsync<number, string>;type Output = Result.ResultFor<R, number, string>; // Result.ResultAsync<number, string> Copy
import { Result } from '@praha/byethrow';type R = Result.ResultAsync<number, string>;type Output = Result.ResultFor<R, number, string>; // Result.ResultAsync<number, string>
import { Result } from '@praha/byethrow';type R = Result.Result<number, string>;type Output = Result.ResultFor<R, number, string>; // Result.Result<number, string> Copy
import { Result } from '@praha/byethrow';type R = Result.Result<number, string>;type Output = Result.ResultFor<R, number, string>; // Result.Result<number, string>
Resolves to the appropriate Result type (sync or async) based on the input type.
Typically used to conditionally infer return types based on whether the original computation was async.