refactor: refine worker attribute scope
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 26 Jun 2023 23:22:38 +0000 (01:22 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 26 Jun 2023 23:22:38 +0000 (01:22 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/abstract-worker.ts

index 8d82ed61d0f239a156ada271b5967ce31317d459..f42f2c473aaaf78e926e029b22b67d82c11b8d54 100644 (file)
@@ -67,7 +67,7 @@ export abstract class AbstractWorker<
     taskFunctions:
     | WorkerFunction<Data, Response>
     | TaskFunctions<Data, Response>,
-    protected mainWorker: MainWorker,
+    protected readonly mainWorker: MainWorker,
     protected readonly opts: WorkerOptions = {
       /**
        * The kill behavior option on this worker or its default value.