Interface

@JSImport("readline", "Interface") @native @JSType class Interface extends StObject
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def addListener(event: String, listener: Function1[Any, Unit]): Interface

events.EventEmitter

events.EventEmitter

  1. close
  2. line
  3. pause
  4. resume
  5. SIGCONT
  6. SIGINT
  7. SIGTSTP
  8. history
@JSName("addListener")
def addListener_SIGCONT(event: SIGCONT, listener: Function0[Unit]): Interface
@JSName("addListener")
def addListener_SIGINT(event: SIGINT, listener: Function0[Unit]): Interface
@JSName("addListener")
def addListener_SIGTSTP(event: SIGTSTP, listener: Function0[Unit]): Interface
@JSName("addListener")
def addListener_close(event: close, listener: Function0[Unit]): Interface
@JSName("addListener")
def addListener_history(event: history, listener: Function1[Array[String], Unit]): Interface
@JSName("addListener")
def addListener_line(event: line, listener: Function1[String, Unit]): Interface
@JSName("addListener")
def addListener_pause(event: pause, listener: Function0[Unit]): Interface
@JSName("addListener")
def addListener_resume(event: resume, listener: Function0[Unit]): Interface
def close(): Unit
def emit(event: String, args: Any*): Boolean
def emit(event: Symbol, args: Any*): Boolean
@JSName("emit")
def emit_SIGCONT(event: SIGCONT): Boolean
@JSName("emit")
def emit_SIGINT(event: SIGINT): Boolean
@JSName("emit")
def emit_SIGTSTP(event: SIGTSTP): Boolean
@JSName("emit")
def emit_close(event: close): Boolean
@JSName("emit")
def emit_history(event: history, history: Array[String]): Boolean
@JSName("emit")
def emit_line(event: line, input: String): Boolean
@JSName("emit")
def emit_pause(event: pause): Boolean
@JSName("emit")
def emit_resume(event: resume): Boolean

Returns the real position of the cursor in relation to the input prompt + string. Long input (wrapping) strings, as well as multiple line prompts are included in the calculations.

Returns the real position of the cursor in relation to the input prompt + string. Long input (wrapping) strings, as well as multiple line prompts are included in the calculations.

def getPrompt(): String
def on(event: String, listener: Function1[Any, Unit]): Interface
@JSName("on")
def on_SIGCONT(event: SIGCONT, listener: Function0[Unit]): Interface
@JSName("on")
def on_SIGINT(event: SIGINT, listener: Function0[Unit]): Interface
@JSName("on")
def on_SIGTSTP(event: SIGTSTP, listener: Function0[Unit]): Interface
@JSName("on")
def on_close(event: close, listener: Function0[Unit]): Interface
@JSName("on")
def on_history(event: history, listener: Function1[Array[String], Unit]): Interface
@JSName("on")
def on_line(event: line, listener: Function1[String, Unit]): Interface
@JSName("on")
def on_pause(event: pause, listener: Function0[Unit]): Interface
@JSName("on")
def on_resume(event: resume, listener: Function0[Unit]): Interface
def once(event: String, listener: Function1[Any, Unit]): Interface
@JSName("once")
def once_SIGCONT(event: SIGCONT, listener: Function0[Unit]): Interface
@JSName("once")
def once_SIGINT(event: SIGINT, listener: Function0[Unit]): Interface
@JSName("once")
def once_SIGTSTP(event: SIGTSTP, listener: Function0[Unit]): Interface
@JSName("once")
def once_close(event: close, listener: Function0[Unit]): Interface
@JSName("once")
def once_history(event: history, listener: Function1[Array[String], Unit]): Interface
@JSName("once")
def once_line(event: line, listener: Function1[String, Unit]): Interface
@JSName("once")
def once_pause(event: pause, listener: Function0[Unit]): Interface
@JSName("once")
def once_resume(event: resume, listener: Function0[Unit]): Interface
def prependListener(event: String, listener: Function1[Any, Unit]): Interface
@JSName("prependListener")
def prependListener_SIGCONT(event: SIGCONT, listener: Function0[Unit]): Interface
@JSName("prependListener")
def prependListener_SIGINT(event: SIGINT, listener: Function0[Unit]): Interface
@JSName("prependListener")
def prependListener_SIGTSTP(event: SIGTSTP, listener: Function0[Unit]): Interface
@JSName("prependListener")
def prependListener_close(event: close, listener: Function0[Unit]): Interface
@JSName("prependListener")
def prependListener_history(event: history, listener: Function1[Array[String], Unit]): Interface
@JSName("prependListener")
def prependListener_line(event: line, listener: Function1[String, Unit]): Interface
@JSName("prependListener")
def prependListener_pause(event: pause, listener: Function0[Unit]): Interface
@JSName("prependListener")
def prependListener_resume(event: resume, listener: Function0[Unit]): Interface
def prependOnceListener(event: String, listener: Function1[Any, Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_SIGCONT(event: SIGCONT, listener: Function0[Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_SIGINT(event: SIGINT, listener: Function0[Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_SIGTSTP(event: SIGTSTP, listener: Function0[Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_close(event: close, listener: Function0[Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_history(event: history, listener: Function1[Array[String], Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_line(event: line, listener: Function1[String, Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_pause(event: pause, listener: Function0[Unit]): Interface
@JSName("prependOnceListener")
def prependOnceListener_resume(event: resume, listener: Function0[Unit]): Interface
def prompt(): Unit
def prompt(preserveCursor: Boolean): Unit
def question(query: String, callback: Function1[String, Unit]): Unit
def question(query: String, options: Abortable, callback: Function1[String, Unit]): Unit
def setPrompt(prompt: String): Unit
def write(data: Buffer): Unit
def write(data: Buffer, key: Key): Unit
def write(data: String): Unit
def write(data: String, key: Key): Unit

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

val cursor: Double

The current cursor position in the input line

The current cursor position in the input line

val line: String

The current input data

The current input data

val terminal: Boolean