Sitelet https://github.com/nodejs/node/issues/2939
Skip to content

Support multiline input with user eval function #2939

Description

@blakeembrey

Currently, the node repl module has the capability to do multiline input when the error is an instanceof Recoverable. Unfortunately, the constructor is not exported from the repl module which results in hacky ways to achieve a multi-line REPL experience like node. By exporting the error constructor, consumers could create their own recoverable instances to function identical to before and have multi-line input work naturally.

References:

if (e instanceof Recoverable) {
, nodejs/node-v0.x-archive#8640, babel/babel#1741, TypeStrong/ts-node#3

Edit: Mostly a question, if it's reasonable to add I can issue a PR for a one-line export change.

Activity

  1. added
    replIssues and PRs related to the REPL subsystem.
    feature requestIssues requesting new Node.js features.
    on Sep 18, 2015
  2. smasher164 commented on Oct 22, 2015

    @smasher164

    Fix for multiline input when using custom eval function @ nodejs/node-v0.x-archive#25587

  3. mikeybox commented on Oct 22, 2015

    @mikeybox

    @blakeembrey Exporting recoverable might be a simpler solution to what I was proposing in my pull request and I think simple is good. I guess we need some input as to which would be preferred. I think it would be good to submit your pull request 👍

  4. added a commit that references this issue on May 12, 2016
  5. added a commit that references this issue on May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions