worker.d.ts 546 B

12345678910111213141516
  1. import { Worker as JestWorker } from 'next/dist/compiled/jest-worker';
  2. declare type FarmOptions = ConstructorParameters<typeof JestWorker>[1];
  3. export declare class Worker {
  4. private _worker;
  5. constructor(workerPath: string, options: FarmOptions & {
  6. timeout?: number;
  7. onRestart?: (method: string, args: any[], attempts: number) => void;
  8. exposedMethods: ReadonlyArray<string>;
  9. });
  10. end(): ReturnType<JestWorker['end']>;
  11. /**
  12. * Quietly end the worker if it exists
  13. */
  14. close(): void;
  15. }
  16. export {};