Skip to main content
ChildProcess.prototype.once - node__child_process.d.ts - Node documentation
method ChildProcess.prototype.once

Usage in Deno

```typescript import { ChildProcess } from "node:node__child_process.d.ts"; ```
ChildProcess.prototype.once(
event: string,
listener: (...args: any[]) => void,
): this

Parameters

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

Return Type

this
ChildProcess.prototype.once(
event: "close",
listener: (
code: number | null,
signal: Signals | null,
) => void
,
): this

Parameters

event: "close"
listener: (
code: number | null,
signal: Signals | null,
) => void

Return Type

this
ChildProcess.prototype.once(
event: "disconnect",
listener: () => void,
): this

Parameters

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

Return Type

this
ChildProcess.prototype.once(
event: "error",
listener: (err: Error) => void,
): this

Parameters

event: "error"
listener: (err: Error) => void

Return Type

this
ChildProcess.prototype.once(
event: "exit",
listener: (
code: number | null,
signal: Signals | null,
) => void
,
): this

Parameters

event: "exit"
listener: (
code: number | null,
signal: Signals | null,
) => void

Return Type

this
ChildProcess.prototype.once(
event: "message",
listener: (
message: Serializable,
sendHandle: SendHandle,
) => void
,
): this

Parameters

event: "message"
listener: (
message: Serializable,
sendHandle: SendHandle,
) => void

Return Type

this
ChildProcess.prototype.once(
event: "spawn",
listener: () => void,
): this

Parameters

event: "spawn"
listener: () => void

Return Type

this