refactor: flag strategy policy property as read only
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 20 Nov 2024 14:33:02 +0000 (15:33 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 20 Nov 2024 14:33:02 +0000 (15:33 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/pools/selection-strategies/abstract-worker-choice-strategy.ts

index 70a00342dd4f908f0e88cdfffb1702250a5005ef..69a30638750dbfee58ae9d372a680171cf88c709 100644 (file)
@@ -25,10 +25,10 @@ export abstract class AbstractWorkerChoiceStrategy<
   Response = unknown
 > implements IWorkerChoiceStrategy {
   /** @inheritDoc */
-  public readonly strategyPolicy: StrategyPolicy = {
+  public readonly strategyPolicy: StrategyPolicy = Object.freeze({
     dynamicWorkerReady: true,
     dynamicWorkerUsage: false,
-  }
+  })
 
   /** @inheritDoc */
   public readonly taskStatisticsRequirements: TaskStatisticsRequirements =