Package-level declarations

Types

Link copied to clipboard
external class Recoverable : <ERROR CLASS> ERROR CLASS: Symbol not found for SyntaxError

Indicates a recoverable error that a REPLServer can use to support multi-line input.

Link copied to clipboard
sealed external interface REPLCommand
Link copied to clipboard
typealias REPLCommandAction = (text: String) -> Unit
Link copied to clipboard
typealias REPLEval = (evalCmd: String, context: Context, file: String, cb: (@R|kotlin/ParameterName|(name = String(err)) ERROR CLASS: Symbol not found for js.errors.JsError??, result: Any?) -> Unit) -> Unit
Link copied to clipboard
sealed external interface ReplOptions
Link copied to clipboard
external class REPLServer : _Interface

Instances of repl.REPLServer are created using the {@link start} method or directly using the JavaScript new keyword.

Link copied to clipboard
sealed external interface REPLServerSetupHistoryOptions
Link copied to clipboard
typealias REPLWriter = (obj: Any?) -> String
Link copied to clipboard
sealed external interface Writer : <ERROR CLASS> ERROR CLASS: Symbol not found for js.function.JsFunction<ERROR CLASS: Symbol not found for js.array.Tuple1<kotlin/Any?>, kotlin/String>

Properties

Link copied to clipboard
external val REPL_MODE_SLOPPY: ERROR CLASS: Symbol not found for js.symbol.Symbol

A flag passed in the REPL options. Evaluates expressions in sloppy mode.

Link copied to clipboard
external val REPL_MODE_STRICT: ERROR CLASS: Symbol not found for js.symbol.Symbol

A flag passed in the REPL options. Evaluates expressions in strict mode. This is equivalent to prefacing every repl statement with 'use strict'.

Link copied to clipboard
external val writer: Writer

This is the default "writer" value, if none is passed in the REPL options, and it can be overridden by custom print functions.

Functions

Link copied to clipboard
external fun start(): REPLServer
external fun start(options: String = definedExternally): REPLServer
external fun start(options: ReplOptions = definedExternally): REPLServer

The repl.start() method creates and starts a {@link REPLServer} instance.