+ * @defaultValue 0
+ */
+ readonly priority?: number
+ /**
+ * Task worker choice strategy.
+ */
+ readonly strategy?: WorkerChoiceStrategy
+ /**
+ * Array of transferable objects.
+ */
+ readonly transferList?: readonly TransferListItem[]
+ /**
+ * Timestamp.
+ */
+ readonly timestamp?: number
+ /**
+ * Task UUID.
+ */
+ readonly taskId?: `${string}-${string}-${string}-${string}-${string}`
+}
+
+/**
+ * Message object that is passed between main worker and worker.
+ *
+ * @typeParam Data - Type of data sent to the worker or execution response. This can only be structured-cloneable data.
+ * @typeParam ErrorData - Type of data sent to the worker triggering an error. This can only be structured-cloneable data.
+ * @internal
+ */
+export interface MessageValue<Data = unknown, ErrorData = unknown>
+ extends Task<Data> {
+ /**
+ * Worker id.
+ */
+ readonly workerId?: number
+ /**
+ * Kill code.
+ */
+ readonly kill?: KillBehavior | true | 'success' | 'failure'
+ /**
+ * Worker error.
+ */
+ readonly workerError?: WorkerError<ErrorData>
+ /**
+ * Task performance.
+ */
+ readonly taskPerformance?: TaskPerformance
+ /**
+ * Task function operation:
+ * - `'add'` - Add a task function.
+ * - `'remove'` - Remove a task function.
+ * - `'default'` - Set a task function as default.
+ */
+ readonly taskFunctionOperation?: 'add' | 'remove' | 'default'
+ /**
+ * Whether the task function operation is successful or not.
+ */
+ readonly taskFunctionOperationStatus?: boolean
+ /**
+ * Task function properties.
+ */
+ readonly taskFunctionProperties?: TaskFunctionProperties
+ /**
+ * Task function serialized to string.
+ */
+ readonly taskFunction?: string
+ /**
+ * Task functions properties.