View source
enum abstract REPLServerEvent<T>(Event<T>)
package js.node.repl
to Event<T>
import js.node.repl.REPLServer
Enumeration of events emitted by the REPLServer
objects.
Variables
inlineread onlyExit:REPLServerEvent<() ‑> Void> = "exit"
The 'exit'
event is emitted when the REPL is exited either by receiving the .exit
command as input,
the user pressing <ctrl>-C
twice to signal SIGINT
, or by pressing <ctrl>-D
to signal 'end' on the input stream.
The listener callback is invoked without any arguments.
See also:
inlineread onlyReset:REPLServerEvent<(context:DynamicAccess<Dynamic>) ‑> Void> = "reset"
The 'reset'
event is emitted when the REPL's context is reset.
This occurs whenever the .clear
command is received as input unless the REPL is using the default evaluator
and the repl.REPLServer
instance was created with the useGlobal
option set to true
.
The listener callback will be called with a reference to the context
object as the only argument.
See also: