build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / worker / WorkerAbstract.ts
index 2f9093f294de59fa3ddc1363f9310de9d98c70b5..75fc2f6bed5baaf47a9e2aae9f52d1992253eec3 100644 (file)
@@ -45,11 +45,11 @@ export abstract class WorkerAbstract<T extends WorkerData> {
     this.workerScript = workerScript;
     this.workerOptions = workerOptions;
     this.workerOptions.poolOptions?.messageHandler?.bind(this);
-    this.workerOptions.poolOptions.errorHandler = (
+    this.workerOptions.poolOptions!.errorHandler = (
       this.workerOptions?.poolOptions?.errorHandler ?? defaultErrorHandler
     ).bind(this) as ErrorHandler<Worker>;
     this.workerOptions.poolOptions?.onlineHandler?.bind(this);
-    this.workerOptions.poolOptions.exitHandler = (
+    this.workerOptions.poolOptions!.exitHandler = (
       this.workerOptions?.poolOptions?.exitHandler ?? defaultExitHandler
     ).bind(this) as ExitHandler<Worker>;
   }