Skip to main content
internal.Duplex.prototype.addListener - stream - Node documentation
method internal.Duplex.prototype.addListener

Usage in Deno

import { internal } from "node:stream";
Duplex.prototype.addListener(
event: "close",
listener: () => void,
): this

Event emitter The defined events on documents including:

  1. close
  2. data
  3. drain
  4. end
  5. error
  6. finish
  7. pause
  8. pipe
  9. readable
  10. resume
  11. unpipe

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this