/**
* Pool tasks usage statistics requirements.
*/
-export type RequiredStatistics = {
+export interface RequiredStatistics {
runTime: boolean
}
/**
* Worker choice strategy interface.
*
- * @template Worker Type of worker which manages the strategy.
+ * @typeParam Worker - Type of worker which manages the strategy.
*/
export interface IWorkerChoiceStrategy<Worker extends IPoolWorker> {
/**
*/
readonly requiredStatistics: RequiredStatistics
/**
- * Resets strategy internal statistics.
+ * Resets strategy internals (counters, statistics, etc.).
*/
- resetStatistics(): boolean
+ reset: () => boolean
/**
* Chooses a worker in the pool.
*/
- choose(): Worker
+ choose: () => Worker
}