Interface PromiseResponseWrapper<Response>Internal

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

interface PromiseResponseWrapper<Response> {
    asyncResource?: AsyncResource;
    reject: ((reason?) => void);
    resolve: ((value) => 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?) => void)

Reject callback to reject the promise.

Type declaration

    • (reason?): void
    • Reject callback to reject the promise.

      Parameters

      • Optional reason: unknown

      Returns void

resolve: ((value) => void)

Resolve callback to fulfill the promise.

Type declaration

    • (value): void
    • Resolve callback to fulfill the promise.

      Parameters

      Returns void

workerNodeKey: number

The worker node key executing the task.

Generated using TypeDoc