Skip to main content
Interface.prototype.on - node__readline.d.ts - Node documentation
method Interface.prototype.on

Usage in Deno

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

Parameters

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

Return Type

this
Interface.prototype.on(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
Interface.prototype.on(
event: "line",
listener: (input: string) => void,
): this

Parameters

event: "line"
listener: (input: string) => void

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this
Interface.prototype.on(
event: "SIGCONT",
listener: () => void,
): this

Parameters

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

Return Type

this
Interface.prototype.on(
event: "SIGINT",
listener: () => void,
): this

Parameters

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

Return Type

this
Interface.prototype.on(
event: "SIGTSTP",
listener: () => void,
): this

Parameters

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

Return Type

this
Interface.prototype.on(
event: "history",
listener: (history: string[]) => void,
): this

Parameters

event: "history"
listener: (history: string[]) => void

Return Type

this