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
FR: Either multiline support or stop-paste-on-error #1352
Comments
Possible duplicate of #729 Marking "help wanted" to indicate we will accept a pull request. Here is some context for any would-be author: We recognize certain TS diagnostics as "recoverable" indicating multiline input. Maybe some diagnostics are missing from this list. Lines 355 to 370 in aba4ae6
Our |
@qpwo are you interested in writing a pull request for this? |
I'll give it a try sometime but expect it to be challenging since I'm not versed in this kind of repo |
No worries, this one should be manageable. Check out CONTRIBUTING.md and
feel free to ask me any questions. `npm run test-local` pretty much does
the heavy lifting.
And thanks!
…On Fri, May 28, 2021, 5:00 PM Luke Harold Miles ***@***.***> wrote:
I'll give it a try sometime but expect it to be challenging since I'm not
versed in this kind of repo
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1352 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC35OACRA7VONWGXIKKL23TP776JANCNFSM45XKBG5Q>
.
|
Isn't following https://docs.micropython.org/en/latest/reference/repl.html#paste-mode a suitable convention? The Micropython REPL feature seems to have a similar purpose, being able to treat multiple lines as a unit before attempting to compile/interpret them. |
Desired Behavior
Copy-paste below code into
ts-node
twice, and only getDuplicate function implementation
error.Current behavior
Is this request related to a problem?
Frustrated when I paste in a function I've defined before and get a pile of errors.
Alternatives you've considered
You can put the code in a block to redefine functions, but maybe I'd rather get the error.
Additional context
I heard there is better multiline support coming to node repl sometime and it might automatically solve this. I don't know much about REPLs or if you have a reliable way to detect if code is being pasted instead of typed.
The text was updated successfully, but these errors were encountered: