-
-
Notifications
You must be signed in to change notification settings - Fork 486
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
refactor(transformer/class-properties): duplicate_object_twice
method
#7685
refactor(transformer/class-properties): duplicate_object_twice
method
#7685
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #7685 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great! You are smart!
Merge activity
|
…od (#7685) Follow-up after #7664. Generalize `duplicate_object` to produce however many duplicates are required. Use it in `transform_expression_to_wrap_nullish_check`. This should be slightly more efficient, and will make it fool-proof if we expand `duplicate_object` later to handle other `Expression` types.
1617edd
to
28ce187
Compare
It's pretty crazy that Rust makes you use unsafe code to do something as simple as creating an array with all items initialized from a function. This should be in the standard library. |
Follow-up after #7664.
Generalize
duplicate_object
to produce however many duplicates are required. Use it intransform_expression_to_wrap_nullish_check
.This should be slightly more efficient, and will make it fool-proof if we expand
duplicate_object
later to handle otherExpression
types.