-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
Convert common helpers to Typescript #2541
Convert common helpers to Typescript #2541
Conversation
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.
Looking good, just a few nitpicks
* @param {User} user | ||
* @param {Object} attrs Attributes to apply to the avatar element | ||
* @return {Object} | ||
* @param attrs Attributes to apply to the avatar element |
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.
I wouldn't want to have one param documented but the other not
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.
The other is still documented in the typehinting. Attrs only remains for the description in the JSDoc. I don't know if we want to do that or keep tham all, howeverr 🤷
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.
I think we should leave all parameters in JSDoc if there's any with description and get rid of all parameters if none of them have any description. By the way this should resolve PHPStorm's warning "Parameter is not described in JSDoc".
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.
Thank you!
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.
👍
See #3533