Skip to content

Allow multi-line REPL prompts like node #3

Description

@blakeembrey

Node appears to handle this by detecting syntax errors. I can probably catch compilation errors and check the error codes are syntax errors too and recover from that.

Relevant: https://github.com/joyent/node/blob/d13d7f74d794340ac5e126cfb4ce507fe0f803d5/lib/repl.js#L125-L129

Activity

  1. self-assigned this
    on Jul 15, 2015
  2. Igorbek commented on Apr 16, 2016

    @Igorbek

    @blakeembrey hey, do you have any update on this?

  3. blakeembrey commented on Apr 16, 2016

    @blakeembrey
    MemberAuthor

    See the linked issue in node.

  4. robey commented on Sep 26, 2016

    @robey

    Looks like this still exists in ts 2.0.

  5. blakeembrey commented on Sep 26, 2016

    @blakeembrey
    MemberAuthor

    Yes, it's unrelated to TypeScript. There's nodejs/node#6171 still pending to support this.

  6. blakeembrey commented on Oct 15, 2016

    @blakeembrey
    MemberAuthor

    Ok, I've implemented basic support for recoverable errors. There may be edge cases until nodejs/node#6171 lands, but I've manually coded the recoverable TypeScript diagnostic codes into https://github.com/TypeStrong/ts-node/blob/master/src/_bin.ts#L362-L369 for now. If you find something that you think should work, let me know and it can be added to the list.

    Edit: Remember, this'll only work on node 6+ as that's when the recoverable error export landed.

  7. added a commit that references this issue on Jun 17, 2018
    e7cdea3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions