-
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
Convert lock unlock to generics #66682
Convert lock unlock to generics #66682
Conversation
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. |
@jsnajdr Should I fix those types that are affected by the updated signature? There are 7 errors in total, fixable by 3-4 minor changes |
…k-unlock-to-generics
@jsnajdr this one addresses your feedback given in #66667 (comment). Can we get this through? |
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.
Works for me. I'd appreciate @jsnajdr's thoughts too.
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.
Yes this looks good. We don't have any real-world usages of the types yet, so we are not sure that they are the correct ones, but we can patch that when some problem is uncovered.
Thank you folks. I can't merge PRs here. Please go ahead whenever you want. |
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.
Thanks @manzoorwanijk, this looks great! I'll get it shipped 🚀
* Convert lock unlock to generics * Set object type from generic for unlock * Fix types affected by updated signature of lock/unlock * Improve signature * Remove expected errors no longer needed * Restore the type for component private APIs Co-authored-by: manzoorwanijk <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: jsnajdr <[email protected]>
* Convert lock unlock to generics * Set object type from generic for unlock * Fix types affected by updated signature of lock/unlock * Improve signature * Remove expected errors no longer needed * Restore the type for component private APIs Co-authored-by: manzoorwanijk <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: jsnajdr <[email protected]>
What?
Addresses the feedback given in #66667 (comment)
Why?
To allow better type support for
lock
andunlock
functionsHow?
This PR makes
lock
andunlock
as generics to set the object typeTesting Instructions
Testing Instructions for Keyboard
Screenshots or screencast