-export type WorkerFunction<Data = unknown, Response = unknown> =
- | WorkerSyncFunction<Data, Response>
- | WorkerAsyncFunction<Data, Response>
+export interface MessageValue<Data = unknown, ErrorData = unknown>
+ extends Task<Data> {
+ /**
+ * Whether the worker starts or stops its activity check.
+ */
+ readonly checkActive?: boolean
+ /**
+ * Kill code.
+ */
+ readonly kill?: 'failure' | 'success' | KillBehavior | true
+ /**
+ * Message port.
+ */
+ readonly port?: MessagePort
+ /**
+ * Whether the worker is ready or not.
+ */
+ readonly ready?: boolean
+ /**
+ * Whether the worker computes the given statistics or not.
+ */
+ readonly statistics?: WorkerStatistics
+ /**
+ * Task function serialized to string.
+ */
+ readonly taskFunction?: string
+ /**
+ * Task function operation:
+ * - `'add'` - Add a task function.
+ * - `'remove'` - Remove a task function.
+ * - `'default'` - Set a task function as default.
+ */
+ readonly taskFunctionOperation?: 'add' | 'default' | 'remove'
+ /**
+ * Whether the task function operation is successful or not.
+ */
+ readonly taskFunctionOperationStatus?: boolean
+ /**
+ * Task function properties.
+ */
+ readonly taskFunctionProperties?: TaskFunctionProperties
+ /**
+ * Task functions properties.
+ */
+ readonly taskFunctionsProperties?: TaskFunctionProperties[]
+ /**
+ * Task performance.
+ */
+ readonly taskPerformance?: TaskPerformance
+ /**
+ * Worker error.
+ */
+ readonly workerError?: WorkerError<ErrorData>
+ /**
+ * Worker id.
+ */
+ readonly workerId?: number
+}