import type { EventLoopUtilization } from 'node:perf_hooks'
-import type { MessagePort } from 'node:worker_threads'
+import type { MessagePort, TransferListItem } from 'node:worker_threads'
import type { KillBehavior } from './worker/worker-options'
/**
* Task input data that will be passed to the worker.
*/
readonly data?: Data
+ /**
+ * Array of transferable objects.
+ */
+ readonly transferList?: TransferListItem[]
/**
* Timestamp.
*/
/**
* Kill code.
*/
- readonly kill?: KillBehavior | true
+ readonly kill?: KillBehavior | true | 'success' | 'failure'
/**
* Task error.
*/
* Task performance.
*/
readonly taskPerformance?: TaskPerformance
+ /**
+ * Task function names.
+ */
+ readonly taskFunctions?: string[]
/**
* Whether the worker computes the given statistics or not.
*/
*/
readonly workerNodeKey: number
}
+
+export type Writable<T> = { -readonly [P in keyof T]: T[P] }