Interface PromiseResponseWrapper<Response>Internal

An object holding the task execution response promise resolve/reject callbacks.

interface PromiseResponseWrapper<Response> {
    asyncResource?: AsyncResource;
    reject: ((reason?: unknown) => void);
    resolve: ((value: Response | PromiseLike<Response>) => void);
    workerNodeKey: number;
}

Type Parameters

  • Response = unknown

    Type of execution response. This can only be structured-cloneable data.

Properties

asyncResource?: AsyncResource

The asynchronous resource used to track the task execution.

reject: ((reason?: unknown) => void)

Reject callback to reject the promise.

resolve: ((value: Response | PromiseLike<Response>) => void)

Resolve callback to fulfill the promise.

workerNodeKey: number

The worker node key executing the task.