-
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
withFocusReturn: Convert to TypeScript #48748
Conversation
* @return Higher Order Component with the focus restauration behaviour. | ||
*/ | ||
export default createHigherOrderComponent( | ||
// @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types |
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.
This HOC was a bit irregular and requires a bit more effort to resolve with the upstream types, so I'll suppress it for now.
Size Change: 0 B Total Size: 1.34 MB ℹ️ View Unchanged
|
Flaky tests detected in 622c11b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4327017513
|
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.
🚀
Same issue as on #48721 regarding static linting CI failures.
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.
This was more of a learning experience than anything else for me, but it looks good to me!
Part of #35744
What?
Convert the
withFocusReturn
HOC to TypeScript.Why?
It isn't really necessary that these HOCs are typed at this point, but just converting them because they are pretty simple. We can
ts-nocheck
any of the ones that are not worthwhile.Testing Instructions
✅ Static checks pass.