Skip to main content
WriteStream.prototype.on - fs - Node documentation
method WriteStream.prototype.on

Usage in Deno

import { WriteStream } from "node:fs";
WriteStream.prototype.on(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this
WriteStream.prototype.on(
event: "open",
listener: (fd: number) => void,
): this

Parameters

event: "open"
listener: (fd: number) => void

Return Type

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

Parameters

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

Return Type

this
WriteStream.prototype.on(
event: "ready",
listener: () => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this