ResultFor<
R
,T
,E
> =true
extendsHasPromise
<R
> ?ResultAsync
<T
,E
> :Result
<T
,E
>
Defined in: result.ts:145
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.
R
The reference type to inspect for a Promise.
T
The type of the Success value.
E
The type of the Failure value.