repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump typedoc from 0.26.0 to 0.26.2
[poolifier.git]
/
src
/
utility-types.ts
diff --git
a/src/utility-types.ts
b/src/utility-types.ts
index 10d9183ca6f262cd25d475737d0e86613a55d247..f13cce6a70d9f60ed7417b9d2a45675c5179fb72 100644
(file)
--- a/
src/utility-types.ts
+++ b/
src/utility-types.ts
@@
-7,7
+7,6
@@
import type { KillBehavior } from './worker/worker-options.js'
/**
* Worker error.
/**
* Worker error.
- *
* @typeParam Data - Type of data sent to the worker triggering an error. This can only be structured-cloneable data.
*/
export interface WorkerError<Data = unknown> {
* @typeParam Data - Type of data sent to the worker triggering an error. This can only be structured-cloneable data.
*/
export interface WorkerError<Data = unknown> {
@@
-27,7
+26,6
@@
export interface WorkerError<Data = unknown> {
/**
* Task performance.
/**
* Task performance.
- *
* @internal
*/
export interface TaskPerformance {
* @internal
*/
export interface TaskPerformance {
@@
-51,7
+49,6
@@
export interface TaskPerformance {
/**
* Worker task performance statistics computation settings.
/**
* Worker task performance statistics computation settings.
- *
* @internal
*/
export interface WorkerStatistics {
* @internal
*/
export interface WorkerStatistics {
@@
-67,27
+64,24
@@
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
}
/**
* Message object that is passed as a task between main worker and worker.
}
/**
* 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
*/
* @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
* @internal
*/
@@
-100,6
+94,15
@@
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,12
+114,11
@@
export interface Task<Data = unknown> {
/**
* Task UUID.
*/
/**
* Task UUID.
*/
- readonly taskId?:
string
+ readonly taskId?:
`${string}-${string}-${string}-${string}-${string}`
}
/**
* Message object that is passed between main worker and worker.
}
/**
* 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
* @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
@@
-182,7
+184,6
@@
export interface MessageValue<Data = unknown, ErrorData = unknown>
/**
* An object holding the task execution response promise resolve/reject callbacks.
/**
* An object holding the task execution response promise resolve/reject callbacks.
- *
* @typeParam Response - Type of execution response. This can only be structured-cloneable data.
* @internal
*/
* @typeParam Response - Type of execution response. This can only be structured-cloneable data.
* @internal
*/