-
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
Update misc types and revert WPCompleter export from components #67599
Update misc types and revert WPCompleter export from components #67599
Conversation
… update types to Object for now. Use ReactElement instead of ReactNode
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Learning from mistakes 😅 Thanks, @ciampo 🙇
@@ -10,12 +10,10 @@ import { decodeEntities } from '@wordpress/html-entities'; | |||
|
|||
const SHOWN_SUGGESTIONS = 10; | |||
|
|||
/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */ |
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.
Removing this as WPCompleter was never exported from the components package until #67410, where it was advised that it shouldn't be exported.
/** | ||
* Creates a suggestion list for links to posts or pages. | ||
* | ||
* @return {WPCompleter} A links completer. | ||
* @return {Object} A links completer. |
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.
Just to have something there. This PR is only meant to avoid type compilation errors for now.
@Mamaduka that was the fastest ✅ in Github history 😆 Thank you!!! |
Size Change: 0 B Total Size: 1.83 MB ℹ️ View Unchanged
|
Co-authored-by: ramonjd <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: ciampo <[email protected]>
Thank you, Ramon! To be clear, my suggestion was to revert the initial change mostly because we don't want to release new APIs if we're not 100% sure about needing them (since once they're released, it's hard to take them back)>. A short-term solution for now could be to "duplicate" the type in JSDoc (rather than using Object). And if we actually need that type def, we can consider our options without being rushed by an upcoming plugin/core release :) |
Thanks for closing the loop here @ciampo
I was just sweeping the street with these type changes, to unblock other work but I'll do a quick JSDoc follow up with this suggestion. 👍🏻 |
What?
Implements feedback from #67410:
Object
for now.Testing Instructions for Keyboard
Build should pass as expected