-
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
FocusableIframe: refactor to TypeScript #53979
Conversation
/** | ||
* Internal dependencies | ||
*/ | ||
import type { FocusableIframeProps } from './types'; | ||
|
||
/** | ||
* @param {Object} props |
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.
* @param {Object} props
should be some variant of ComponentPropsWithoutRef< 'iframe' >
to match my change? Idk enough about JSDoc types for an opinion. There are a few other good ways to do this: https://mortenbarklund.com/blog/react-typescript-props-spread/ that I could switch to.
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.
We usually remove the types entirely from JSDocs when using TypeScript types. In this case, since the JSDoc comment was just there for adding type information, I'd argue that we can just simply delete it altogether.
d510417
to
13fba3e
Compare
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 for working on this! This PR is good to go after deleting the JSDoc comment block as discussed in https://github.com/WordPress/gutenberg/pull/53979/files#r1306938378
/** | ||
* Internal dependencies | ||
*/ | ||
import type { FocusableIframeProps } from './types'; | ||
|
||
/** | ||
* @param {Object} props |
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.
We usually remove the types entirely from JSDocs when using TypeScript types. In this case, since the JSDoc comment was just there for adding type information, I'd argue that we can just simply delete it altogether.
6dbd71c
to
9598a11
Compare
@ciampo Removed JSDocs and rebased to make sure the changelog was happy with both of these branches making internal sections. |
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.
LGTM 🚀
Thank you!
What?
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast