-
-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multi-line REPL prompts like node #3
Comments
@blakeembrey hey, do you have any update on this? |
See the linked issue in node. |
Looks like this still exists in ts 2.0. |
Yes, it's unrelated to TypeScript. There's nodejs/node#6171 still pending to support this. |
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. |
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
The text was updated successfully, but these errors were encountered: