happy-rusty
    Preparing search index...

    Type Alias AsyncLikeResult<T, E>

    AsyncLikeResult: PromiseLike<Result<T, E>>

    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.

    1.8.0

    // Works with any PromiseLike, not just Promise
    const thenable: AsyncLikeResult<number, string> = {
    then(resolve) { resolve(Ok(42)); }
    };