Skip to content

Exports

[<Class>]
type Exports =
    static member REPL_MODE_SLOPPY: Symbol
    static member REPL_MODE_STRICT: Symbol
    static member writer: Writer
    static member Recoverable (err: exn) : Recoverable
    static member start (?options: U2<string,ReplOptions>) : REPLServer
AssemblyXantham.Fable.Node
Attributes[<Erase>]

The package's value exports, each bound to its import.

Properties

static member REPL_MODE_SLOPPY: Symbol

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

static member REPL_MODE_STRICT: Symbol

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

static member 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.

Methods

static member Recoverable (err: exn) : Recoverable

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

@see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_recoverable_errors

static member start (?options: U2<string,ReplOptions>) : REPLServer

The repl.start() method creates and starts a REPLServer instance.

If options is a string, then it specifies the input prompt:

import repl from 'node:repl';

// a Unix style prompt
repl.start('$ ');

@since v0.1.91