-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Support for ECMAScript 'do'-expressions #13156
Comments
These could be quite pleasant to use but unfortunately the proposal is still at Stage 0 in TC39. |
I wish it was haskell's |
+1 |
looks like this is now in TC39 stage 1 🎉 |
+1 @aluanhaddad What's the accepting standard for ex-next? Is stage 2+ or stage 1 is ok? |
TypeScript tends to adopt proposals once they reach stage 3 in TC39. This is not a hard and fast rule and there are exceptions such as |
As discussed in #20743, I think this should be added in typescript now I really feel so :) Using kotlin for quite some time and similar syntax for this is quite productive
|
Any progress on this one? |
Any progress on this one? |
@vipcxj Please check the stage of the proposal. Currently, it is still at stage-1, meaning it's in the proposal stage. This means that the syntax is still being drafted, and thus subject to wild changes. TS doesn't like to adopt TC39 proposals until they're at least candidates (stage 3). Sometimes they'll implement draft (stage 2), but its very rare, and something they're actively trying to avoid. You should wait until the proposal is at least in draft status before adopting it. |
This could be a part of TypeScript itself, so no need to wait on JavaScript proposal. Thoughts? |
I'm curious about why we need import h from 'hyperscript';
import o from 'observable';
const root = h('div', {
const count = o(0);
[
h('h1', {title: count}, count),
h('button', { onclick: e => count(count()+1) }, 'add 1')
]
});
document.body.append(root); |
Please discuss the proposal in the proposal repo, not hereThanks! |
Is there a way to stop the typescript language server from erroring on |
I'd like to know about this, too ^ |
Sorry if this has been discussed but it is hard to search for such a generic combination of words.
Is there any plan to implement support for https://github.com/tc39/proposal-do-expressions
http://wiki.ecmascript.org/doku.php?id=strawman:do_expressionsIt would be awesome to be able to avoid the extra code required when wrapping an if statement in a function to get a dynamic return value.
Thanks!
The text was updated successfully, but these errors were encountered: