repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore: v4.0.8
[poolifier.git]
/
src
/
utility-types.ts
diff --git
a/src/utility-types.ts
b/src/utility-types.ts
index 10d9183ca6f262cd25d475737d0e86613a55d247..82f79230accb88160ae612e9d5cc5ba7da57d157 100644
(file)
--- a/
src/utility-types.ts
+++ b/
src/utility-types.ts
@@
-67,22
+67,20
@@
export interface WorkerStatistics {
/**
* Task function properties.
/**
* Task function properties.
- *
- * @internal
*/
export interface TaskFunctionProperties {
/**
* Task function name.
*/
*/
export interface TaskFunctionProperties {
/**
* Task function name.
*/
- name: string
+
readonly
name: string
/**
* Task function priority. Lower values have higher priority.
*/
/**
* Task function priority. Lower values have higher priority.
*/
- priority?: number
+
readonly
priority?: number
/**
* Task function worker choice strategy.
*/
/**
* Task function worker choice strategy.
*/
- strategy?: WorkerChoiceStrategy
+
readonly
strategy?: WorkerChoiceStrategy
}
/**
}
/**
@@
-100,6
+98,16
@@
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
+ /**
+ * Task priority. Lower values have higher priority.
+ *
+ * @defaultValue 0
+ */
+ readonly priority?: number
+ /**
+ * Task worker choice strategy.
+ */
+ readonly strategy?: WorkerChoiceStrategy
/**
* Array of transferable objects.
*/
/**
* Array of transferable objects.
*/
@@
-111,7
+119,7
@@
export interface Task<Data = unknown> {
/**
* Task UUID.
*/
/**
* Task UUID.
*/
- readonly taskId?:
string
+ readonly taskId?:
`${string}-${string}-${string}-${string}-${string}`
}
/**
}
/**