Skip to main content
default.Duplex.prototype.on - stream - Node documentation
method default.Duplex.prototype.on

Usage in Deno

import mod from "node:stream";
Duplex.prototype.on(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
Duplex.prototype.on(
event: "data",
listener: (chunk: any) => void,
): this

Parameters

event: "data"
listener: (chunk: any) => void

Return Type

this
Duplex.prototype.on(
event: "drain",
listener: () => void,
): this

Parameters

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

Return Type

this
Duplex.prototype.on(
event: "end",
listener: () => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

this
Duplex.prototype.on(
event: "finish",
listener: () => void,
): this

Parameters

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

Return Type

this
Duplex.prototype.on(
event: "pause",
listener: () => void,
): this

Parameters

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

Return Type

this
Duplex.prototype.on(
event: "pipe",
listener: (src: Readable) => void,
): this

Parameters

event: "pipe"
listener: (src: Readable) => void

Return Type

this
Duplex.prototype.on(
event: "readable",
listener: () => void,
): this

Parameters

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

Return Type

this
Duplex.prototype.on(
event: "resume",
listener: () => void,
): this

Parameters

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

Return Type

this
Duplex.prototype.on(
event: "unpipe",
listener: (src: Readable) => void,
): this

Parameters

event: "unpipe"
listener: (src: Readable) => void

Return Type

this
Duplex.prototype.on(
event: string | symbol,
listener: (...args: any[]) => void,
): this

Parameters

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

Return Type

this
Back to top