Skip to main content

construct

Function construct 

Source
pub fn construct(name: &str, args: &[Value]) -> Result<Value, String>
Expand description

new repl.REPLServer([options]) / new repl.Recoverable(err).

  • REPLServer — same object start() produces (see new_repl_server); the constructor form does NOT auto-start the interactive loop (Node’s does), so this is a best-effort holder for the resolved options.
  • Recoverable — Node wraps a syntax error the REPL should treat as “keep reading more lines”. We build a real Error (so instanceof Error holds) carrying the original error as .err, matching Node’s public shape.