/** @inheritdoc */
public registerWorkerEventHandler (
event: string,
- listener:
+ handler:
| OnlineHandler<Worker>
| MessageHandler<Worker>
| ErrorHandler<Worker>
| ExitHandler<Worker>
): void {
- this.worker.on(event, listener)
+ this.worker.on(event, handler)
}
/** @inheritdoc */
public registerOnceWorkerEventHandler (
event: string,
- listener:
+ handler:
| OnlineHandler<Worker>
| MessageHandler<Worker>
| ErrorHandler<Worker>
| ExitHandler<Worker>
): void {
- this.worker.once(event, listener)
+ this.worker.once(event, handler)
}
/** @inheritdoc */
*/
readonly threadId?: number
/**
- * Registers an event listener.
+ * Registers an event handler.
*
* @param event - The event.
* @param handler - The event handler.
| ExitHandler<this>
) => void
/**
- * Registers once an event listener.
+ * Registers once an event handler.
*
* @param event - The event.
* @param handler - The event handler.
* Registers a worker event handler.
*
* @param event - The event.
- * @param listener - The event listener.
+ * @param handler - The event handler.
*/
readonly registerWorkerEventHandler: (
event: string,
- listener:
+ handler:
| OnlineHandler<Worker>
| MessageHandler<Worker>
| ErrorHandler<Worker>
* Registers once a worker event handler.
*
* @param event - The event.
- * @param listener - The event listener.
+ * @param handler - The event handler.
*/
readonly registerOnceWorkerEventHandler: (
event: string,
- listener:
+ handler:
| OnlineHandler<Worker>
| MessageHandler<Worker>
| ErrorHandler<Worker>