- public static getWorkerImpl(workerScript: string): Wrk {
- switch (Configuration.getWorkerProcess()) {
+ public static getWorkerImplementation<T>(workerScript: string, workerProcessType: WorkerProcessType, options?: WorkerOptions): WorkerAbstract {
+ if (!isMainThread) {
+ throw new Error('Trying to get a worker implementation outside the main thread');
+ }
+ if (Utils.isUndefined(options)) {
+ options = {} as WorkerOptions;
+ }
+ switch (workerProcessType) {