类:REPLServer
¥Class: REPLServer
- 
options<Object> | <string> 参见repl.start()¥ options<Object> | <string> Seerepl.start()
- 
¥Extends: <readline.Interface> 
repl.REPLServer 的实例是使用 repl.start() 方法或直接使用 JavaScript new 关键字创建的。
¥Instances of repl.REPLServer are created using the repl.start() method
or directly using the JavaScript new keyword.
import repl from 'node:repl';
const options = { useColors: true };
const firstInstance = repl.start(options);
const secondInstance = new repl.REPLServer(options);const repl = require('node:repl');
const options = { useColors: true };
const firstInstance = repl.start(options);
const secondInstance = new repl.REPLServer(options);