Represents an asynchronous Result that is wrapped in a PromiseLike.
This is similar to AsyncResult<T, E> but uses PromiseLike instead of Promise,
allowing compatibility with any thenable object.
Type Parameters
T
The type of the value that is produced by a successful operation.
E
The type of the error that may be produced by a failed operation.
Since
1.8.0
Example
// Works with any PromiseLike, not just Promise constthenable: AsyncLikeResult<number, string> = { then(resolve) { resolve(Ok(42)); } };
Represents an asynchronous
Resultthat is wrapped in aPromiseLike. This is similar toAsyncResult<T, E>but usesPromiseLikeinstead ofPromise, allowing compatibility with any thenable object.