ReplOptions
[<Interface>]
type ReplOptions =
abstract member breakEvalOnSigint: bool option with get, set
abstract member completer: U2<AsyncCompleter,Completer> option with get, set
abstract member eval: REPLEval option with get, set
abstract member ignoreUndefined: bool option with get, set
abstract member input: ReadableStream option with get, set
abstract member output: WritableStream option with get, set
abstract member preview: bool option with get, set
abstract member prompt: string option with get, set
abstract member replMode: Symbol option with get, set
abstract member terminal: bool option with get, set
abstract member useColors: bool option with get, set
abstract member useGlobal: bool option with get, set
abstract member writer: REPLWriter option with get, set
static member Create (?prompt: string, ?input: ReadableStream, ?output: WritableStream, ?terminal: bool, ?eval: REPLEval, ?preview: bool, ?useColors: bool, ?useGlobal: bool, ?ignoreUndefined: bool, ?writer: REPLWriter, ?completer: U2<AsyncCompleter,Completer>, ?replMode: Symbol, ?breakEvalOnSigint: bool) : ReplOptions| Assembly | Xantham.Fable.Node |
| Attributes | [<Interface>] |
Properties
abstract member breakEvalOnSigint: bool option with get, set
abstract member breakEvalOnSigint: bool option with get, setStop evaluating the current piece of code when SIGINT is received, i.e. Ctrl+C is pressed. This cannot be used together with a custom eval function.
abstract member completer: U2<AsyncCompleter,Completer> option with get, set
abstract member completer: U2<AsyncCompleter,Completer> option with get, setAn optional function used for custom Tab auto completion.
@see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#readline_use_of_the_completer_function
abstract member eval: REPLEval option with get, set
abstract member eval: REPLEval option with get, setThe function to be used when evaluating each given line of input. Default: an async wrapper for the JavaScript eval() function. An eval function can error with repl.Recoverable to indicate the input was incomplete and prompt for additional lines. See the custom evaluation functions section for more details.
abstract member ignoreUndefined: bool option with get, set
abstract member ignoreUndefined: bool option with get, setIf true, specifies that the default writer will not output the return value of a command if it evaluates to undefined.
abstract member input: ReadableStream option with get, set
abstract member input: ReadableStream option with get, setThe Readable stream from which REPL input will be read.
abstract member output: WritableStream option with get, set
abstract member output: WritableStream option with get, setThe Writable stream to which REPL output will be written.
abstract member preview: bool option with get, set
abstract member preview: bool option with get, setDefines if the repl prints output previews or not.
abstract member replMode: Symbol option with get, set
abstract member replMode: Symbol option with get, setA flag that specifies whether the default evaluator executes all JavaScript commands in strict mode or default (sloppy) mode. Accepted values are:
repl.REPL_MODE_SLOPPY- evaluates expressions in sloppy mode.repl.REPL_MODE_STRICT- evaluates expressions in strict mode. This is equivalent to prefacing every repl statement with'use strict'.
abstract member terminal: bool option with get, set
abstract member terminal: bool option with get, setIf true, specifies that the output should be treated as a TTY terminal, and have ANSI/VT100 escape codes written to it. Default: checking the value of the isTTY property on the output stream upon instantiation.
abstract member useColors: bool option with get, set
abstract member useColors: bool option with get, setIf true, specifies that the default writer function should include ANSI color styling to REPL output. If a custom writer function is provided then this has no effect.
abstract member useGlobal: bool option with get, set
abstract member useGlobal: bool option with get, setIf true, specifies that the default evaluation function will use the JavaScript global as the context as opposed to creating a new separate context for the REPL instance. The node CLI REPL sets this value to true.
abstract member writer: REPLWriter option with get, set
abstract member writer: REPLWriter option with get, setThe function to invoke to format the output of each command before writing to output.
@see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_customizing_repl_output
Methods
static member Create (?prompt: string, ?input: ReadableStream, ?output: WritableStream, ?terminal: bool, ?eval: REPLEval, ?preview: bool, ?useColors: bool, ?useGlobal: bool, ?ignoreUndefined: bool, ?writer: REPLWriter, ?completer: U2<AsyncCompleter,Completer>, ?replMode: Symbol, ?breakEvalOnSigint: bool) : ReplOptions