Skip to main content
ReadStream.prototype.on - node__fs.d.ts - Node documentation
method ReadStream.prototype.on

Usage in Deno

```typescript import { ReadStream } from "node:node__fs.d.ts"; ```
ReadStream.prototype.on(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
ReadStream.prototype.on(
event: "data",
listener: (chunk: Buffer | string) => void,
): this

Parameters

event: "data"
listener: (chunk: Buffer | string) => void

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this