shajara API
    Preparing search index...

    Interface StatefulPromise<Return>

    Promise for a launched routine with live lifecycle state.

    interface StatefulPromise<Return> {
        "[toStringTag]": string;
        status: LaunchStatus;
        catch<TResult = never>(
            onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
        ): Promise<Return | TResult>;
        finally(onfinally?: (() => void) | null): Promise<Return>;
        then<TResult1 = Return, TResult2 = never>(
            onfulfilled?:
                | ((value: Return) => TResult1 | PromiseLike<TResult1>)
                | null,
            onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
        ): Promise<TResult1 | TResult2>;
    }

    Type Parameters

    • Return

    Hierarchy

    • Promise<Return>
      • StatefulPromise
    Index

    Properties

    "[toStringTag]": string
    status: LaunchStatus

    Current lifecycle state for the launched routine.

    Methods

    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • TResult = never

      Parameters

      • Optionalonrejected: ((reason: any) => TResult | PromiseLike<TResult>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<Return | TResult>

      A Promise for the completion of the callback.

    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • Optionalonfinally: (() => void) | null

        The callback to execute when the Promise is settled (fulfilled or rejected).

      Returns Promise<Return>

      A Promise for the completion of the callback.

    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      • TResult1 = Return
      • TResult2 = never

      Parameters

      • Optionalonfulfilled: ((value: Return) => TResult1 | PromiseLike<TResult1>) | null

        The callback to execute when the Promise is resolved.

      • Optionalonrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<TResult1 | TResult2>

      A Promise for the completion of which ever callback is executed.