+ /**
+ * Task data triggering task error.
+ */
+ readonly errorData?: unknown
+ /**
+ * Task performance.
+ */
+ readonly taskPerformance?: TaskPerformance
+ /**
+ * Reference to main worker.
+ */
+ readonly parent?: MainWorker
+ /**
+ * Whether to compute the given statistics or not.
+ */
+ readonly statistics?: WorkerStatistics
+}
+
+/**
+ * An object holding the execution response promise resolve/reject callbacks.
+ *
+ * @typeParam Worker - Type of worker.
+ * @typeParam Response - Type of execution response. This can only be serializable data.
+ * @internal
+ */
+export interface PromiseResponseWrapper<
+ Worker extends IWorker,
+ Response = unknown
+> {
+ /**
+ * Resolve callback to fulfill the promise.
+ */
+ readonly resolve: (value: Response) => void
+ /**
+ * Reject callback to reject the promise.
+ */
+ readonly reject: (reason?: string) => void
+ /**
+ * The worker handling the execution.
+ */
+ readonly worker: Worker