repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): bump poolifier
[poolifier.git]
/
src
/
utility-types.ts
diff --git
a/src/utility-types.ts
b/src/utility-types.ts
index 123b5d6ea4fa397982c6195de0d9ccd95ba0c1df..12067c077e06599339a0b01e0ebc51df42178713 100644
(file)
--- a/
src/utility-types.ts
+++ b/
src/utility-types.ts
@@
-1,5
+1,5
@@
import type { EventLoopUtilization } from 'node:perf_hooks'
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'
/**
import type { KillBehavior } from './worker/worker-options'
/**
@@
-75,6
+75,10
@@
export interface Task<Data = unknown> {
* Task input data that will be passed to the worker.
*/
readonly data?: Data
* Task input data that will be passed to the worker.
*/
readonly data?: Data
+ /**
+ * Array of transferable objects.
+ */
+ readonly transferList?: TransferListItem[]
/**
* Timestamp.
*/
/**
* Timestamp.
*/
@@
-97,7
+101,7
@@
export interface MessageValue<Data = unknown, ErrorData = unknown>
/**
* Kill code.
*/
/**
* Kill code.
*/
- readonly kill?: KillBehavior | true
+ readonly kill?: KillBehavior | true
| 'success' | 'failure'
/**
* Task error.
*/
/**
* Task error.
*/
@@
-106,6
+110,10
@@
export interface MessageValue<Data = unknown, ErrorData = unknown>
* Task performance.
*/
readonly taskPerformance?: TaskPerformance
* Task performance.
*/
readonly taskPerformance?: TaskPerformance
+ /**
+ * Task function names.
+ */
+ readonly taskFunctions?: string[]
/**
* Whether the worker computes the given statistics or not.
*/
/**
* Whether the worker computes the given statistics or not.
*/
@@
-144,3
+152,5
@@
export interface PromiseResponseWrapper<Response = unknown> {
*/
readonly workerNodeKey: number
}
*/
readonly workerNodeKey: number
}
+
+export type Writable<T> = { -readonly [P in keyof T]: T[P] }