-export default abstract class WorkerAbstract {
- protected workerScript: string;
- public abstract size: number;
- public abstract maxElementsPerWorker: number;
+import type { PoolInfo } from 'poolifier';
+
+import type { SetInfo, WorkerData, WorkerOptions } from './WorkerTypes';
+import { defaultErrorHandler, defaultExitHandler } from './WorkerUtils';
+
+export abstract class WorkerAbstract<T extends WorkerData> {
+ protected readonly workerScript: string;
+ protected readonly workerOptions: WorkerOptions;
+ public abstract readonly info: PoolInfo | SetInfo;
+ public abstract readonly size: number;
+ public abstract readonly maxElementsPerWorker: number | undefined;
+ public abstract readonly emitter: EventEmitter | undefined;