Bump @types/node from 14.17.5 to 16.6.2 (#480)
[poolifier.git] / src / worker / abstract-worker.ts
index e97c03473c2dc04da13d6507b40fc750ca72d8a8..0883b03eb0b5e6587892b5e6456745e8ce53cdd6 100644 (file)
@@ -43,7 +43,7 @@ export abstract class AbstractWorker<
     type: string,
     isMain: boolean,
     fn: (data: Data) => Response,
-    protected mainWorker: MainWorker | null,
+    protected mainWorker: MainWorker | undefined | null,
     public readonly opts: WorkerOptions = {
       /**
        * The kill behavior option on this Worker or its default value.
@@ -146,7 +146,7 @@ export abstract class AbstractWorker<
    * @returns Message of the error.
    */
   protected handleError (e: Error | string): string {
-    return e.toString()
+    return e as string
   }
 
   /**