+ /**
+ * Whether the worker computes the task event loop utilization (ELU) or not.
+ */
+ readonly elu: boolean
+ /**
+ * Whether the worker computes the task runtime or not.
+ */
+ readonly runTime: boolean
+}
+
+/**
+ * Task function properties.
+ */
+export interface TaskFunctionProperties {
+ /**
+ * Task function name.
+ */
+ readonly name: string
+ /**
+ * Task function priority. Lower values have higher priority.
+ */
+ readonly priority?: number
+ /**
+ * Task function worker choice strategy.
+ */
+ readonly strategy?: WorkerChoiceStrategy
+}
+
+/**
+ * Message object that is passed as a task between main worker and worker.
+ * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
+ * @internal
+ */
+export interface Task<Data = unknown> {
+ /**
+ * Task input data that will be passed to the worker.
+ */
+ readonly data?: Data
+ /**
+ * Task name.
+ */
+ readonly name?: string
+ /**
+ * Task priority. Lower values have higher priority.
+ * @defaultValue 0
+ */
+ readonly priority?: number
+ /**
+ * Task worker choice strategy.
+ */
+ readonly strategy?: WorkerChoiceStrategy
+ /**
+ * Task UUID.
+ */
+ readonly taskId?: `${string}-${string}-${string}-${string}-${string}`
+ /**
+ * Timestamp.
+ */
+ readonly timestamp?: number
+ /**
+ * Array of transferable objects.
+ */
+ readonly transferList?: readonly TransferListItem[]