Skip to main content
Cluster.prependOnceListener - node__cluster.d.ts - Node documentation
method Cluster.prependOnceListener

Usage in Deno

```typescript import { type Cluster } from "node:node__cluster.d.ts"; ```
Cluster.prependOnceListener(
event: string,
listener: (...args: any[]) => void,
): this

Parameters

event: string
listener: (...args: any[]) => void

Return Type

this
Cluster.prependOnceListener(
event: "disconnect",
listener: (worker: Worker) => void,
): this

Parameters

event: "disconnect"
listener: (worker: Worker) => void

Return Type

this
Cluster.prependOnceListener(
event: "exit",
listener: (
worker: Worker,
code: number,
signal: string,
) => void
,
): this

Parameters

event: "exit"
listener: (
worker: Worker,
code: number,
signal: string,
) => void

Return Type

this
Cluster.prependOnceListener(
event: "fork",
listener: (worker: Worker) => void,
): this

Parameters

event: "fork"
listener: (worker: Worker) => void

Return Type

this
Cluster.prependOnceListener(
event: "listening",
listener: (
worker: Worker,
address: Address,
) => void
,
): this

Parameters

event: "listening"
listener: (
worker: Worker,
address: Address,
) => void

Return Type

this
Cluster.prependOnceListener(
event: "message",
listener: (
worker: Worker,
message: any,
handle: net.Socket | net.Server,
) => void
,
): this

Parameters

event: "message"
listener: (
worker: Worker,
message: any,
handle: net.Socket | net.Server,
) => void

Return Type

this
Cluster.prependOnceListener(
event: "online",
listener: (worker: Worker) => void,
): this

Parameters

event: "online"
listener: (worker: Worker) => void

Return Type

this
Cluster.prependOnceListener(
event: "setup",
listener: (settings: ClusterSettings) => void,
): this

Parameters

event: "setup"
listener: (settings: ClusterSettings) => void

Return Type

this