Skip to main content
node__repl.d.ts - Node documentation

Usage in Deno

```typescript import * as mod from "node:node__repl.d.ts"; ```
> [!WARNING] Deno compatibility > All symbols are not supported. The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation that is available both as a standalone program or includible in other applications. It can be accessed using: ```js import repl from 'node:repl'; ```

Classes

c
Recoverable
> [!WARNING] Deno compatibility > This symbol is not supported. Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
c
REPLServer
> [!WARNING] Deno compatibility > This symbol is not supported. Instances of `repl.REPLServer` are created using the [start](.././node__repl.d.ts/~/start) method or directly using the JavaScript `new` keyword. ```js import repl from 'node:repl'; const options = { useColors: true }; const firstInstance = repl.start(options); const secondInstance = new repl.REPLServer(options); ```

Functions

f
start
> [!WARNING] Deno compatibility > This symbol is not supported. The `repl.start()` method creates and starts a [REPLServer](.././node__repl.d.ts/~/REPLServer) instance. If `options` is a string, then it specifies the input prompt: ```js import repl from 'node:repl'; // a Unix style prompt repl.start('$ '); ```

Interfaces

I
REPLCommand
> [!WARNING] Deno compatibility > This symbol is not supported.

Type Aliases

T
REPLCommandAction
> [!WARNING] Deno compatibility > This symbol is not supported.
T
REPLEval
> [!WARNING] Deno compatibility > This symbol is not supported.
T
REPLWriter
> [!WARNING] Deno compatibility > This symbol is not supported.

Variables

v
REPL_MODE_SLOPPY
A flag passed in the REPL options. Evaluates expressions in sloppy mode.
v
REPL_MODE_STRICT
A flag passed in the REPL options. Evaluates expressions in strict mode. This is equivalent to prefacing every repl statement with `'use strict'`.
v
writer
This is the default "writer" value, if none is passed in the REPL options, and it can be overridden by custom print functions.