X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpools%2Fselection-strategies%2Fselection-strategies-types.ts;h=3e7c3427e84f7bedb015e8f6d7ef54215377bd40;hb=ffcbbad84f63b8a77f2b1a08f82deef5430f646e;hp=499b8e489e744a3fad453391b8e4e664c90eac94;hpb=6ffb8e34e2276cc0e0f5576749e190d1d914b7d4;p=poolifier.git diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index 499b8e48..3e7c3427 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -30,14 +30,14 @@ export type WorkerChoiceStrategy = keyof typeof WorkerChoiceStrategies /** * 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 { /** @@ -51,9 +51,9 @@ export interface IWorkerChoiceStrategy { /** * Resets strategy internals (counters, statistics, etc.). */ - reset(): boolean + reset: () => boolean /** * Chooses a worker in the pool. */ - choose(): Worker + choose: () => Worker }