-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DRY await destructure and each destructure code #4560
Comments
To answer your question on that PR, yeah I'd definitely be in favor of switching each block destructuring over to your new code that can handle default values. |
@Conduitry yea i understand about the code part. i will use the each block destructuring code, but how about the behavior? should we have a default value in the destructuring? |
Oh I may have misunderstood your other comment. I thought your spread implementation for awaits already supported default values. If it doesn't, I don't think we need to get that in as part of this issue, because it's apparently not a highly demanded feature as it's never come up as far as I know. |
oh i think i misunderstood you. the await destructure supports default value, but the each destructure does not. so, i was asking of whether to support default value on each destructure too... ...and i noticed then in the generated code, each destructure will "transpile" to assignment statements:
whereas the await destructure, i was using object destructure:
is there any concern or preference for either? according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment, array destructuring rest is still not supported for safari, is that why? |
Reference: #4548 (comment)
The text was updated successfully, but these errors were encountered: