REPLServer.prototype.on - Node documentation
method REPLServer.prototype.on

Usage in Deno

import { REPLServer } from "node:repl";
REPLServer.prototype.on(
event: string,
listener: (...args: any[]) => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this
REPLServer.prototype.on(
event: "exit",
listener: () => void,
): this

Parameters

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

Return Type

this
REPLServer.prototype.on(
event: "reset",
listener: (context: Context) => void,
): this

Parameters

event: "reset"
listener: (context: Context) => void

Return Type

this