Flag some attributes as readonly
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 14 Oct 2022 09:47:57 +0000 (11:47 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 14 Oct 2022 09:47:57 +0000 (11:47 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/selection-strategies/dynamic-pool-worker-choice-strategy.ts
src/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.ts

index 81f3df519fecffcd7fa5aaec04a7e3e4cdc14689..9b4b6ddeeaa2c520ef2252c9e47ac0b061f5a4fa 100644 (file)
@@ -31,7 +31,7 @@ export class DynamicPoolWorkerChoiceStrategy<
    */
   public constructor (
     pool: IPoolInternal<Worker, Data, Response>,
-    private createDynamicallyWorkerCallback: () => Worker,
+    private readonly createDynamicallyWorkerCallback: () => Worker,
     workerChoiceStrategy: WorkerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN
   ) {
     super(pool)
index 752ae93317ae436dfaab13a55bee86930c0e130a..c2f85145c44dfd4d3eee48fba3fd9d6c64db94d0 100644 (file)
@@ -41,7 +41,7 @@ export class WeightedRoundRobinWorkerChoiceStrategy<
   /**
    * Default worker weight.
    */
-  private defaultWorkerWeight: number
+  private readonly defaultWorkerWeight: number
   /**
    * Per worker virtual task runtime map.
    */