Interface IWorker

Worker interface.

Hierarchy

  • IWorker

Properties

Properties

on: ((event: "message", handler: MessageHandler<IWorker>) => void) & ((event: "error", handler: ErrorHandler<IWorker>) => void) & ((event: "online", handler: OnlineHandler<IWorker>) => void) & ((event: "exit", handler: ExitHandler<IWorker>) => void)

Register an event listener.

Param

The event.

Param

The event listener.

once: ((event: "exit", handler: ExitHandler<IWorker>) => void)

Type declaration

    • (event: "exit", handler: ExitHandler<IWorker>): void
    • Register a listener to the exit event that will only performed once.

      Parameters

      Returns void

Generated using TypeDoc