Skip to content

Use shorthand property assignment in convert parameters to object #30468

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

Merged
merged 8 commits into from
Mar 19, 2019

Conversation

gabritto
Copy link
Member

This PR changes the way the argument object is created by 'convert parameters to destructured object' when refactoring a function call. When creating a property assignment of the argument object we now use shorthand property assignments when possible.
This PR also adjusts the refactoring so that it is not offered on a function's JSDoc comment.

@gabritto gabritto requested a review from sandersn March 18, 2019 18:22
//// */
////export function /*c*/getBoolFromAttribute/*d*/(
//// /*e*//** inline JSDoc *//*f*/ attr: string | string[],
//// def: boolean = false): boolean { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the refactoring here change jsDoc as well? Why not verify new content as well apart from verifying refactor available?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far it does not change JSDoc, that's a future work item.

@gabritto gabritto merged commit 84087d0 into master Mar 19, 2019
@gabritto gabritto deleted the shorthandPropertyInConvertParamsToObject branch March 19, 2019 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants