-
Notifications
You must be signed in to change notification settings - Fork 4.7k
TypeScript: Convert data controls to TS #70838
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
base: trunk
Are you sure you want to change the base?
Conversation
|
Size Change: 0 B Total Size: 3.08 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 463a478. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19095424640
|
51084bd to
004a1c5
Compare
|
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. |
What?
Converts several JavaScript files in the
@wordpress/datapackage to TypeScript.Why?
This is part of the ongoing effort (via #67691) to improve type safety and developer experience in the Gutenberg codebase by migrating JavaScript files to TypeScript.
How?
Converted the following files from JavaScript to TypeScript:
controls.js→controls.ts: Added types for theselect,resolveSelect, anddispatchcontrol functions, including proper typing forStoreDescriptorparameters and control arguments (SelectorControlArgs,ActionControlArgs).promise-middleware.js→promise-middleware.ts: Added the ReduxMiddlewaretype annotation.resolvers-cache-middleware.js→resolvers-cache-middleware.ts: Added types for the registry parameter (WPDataRegistry), store name, and the resolver entries map.Testing Instructions
npm run clean:package-types && npm run buildto verify the build succeeds.Testing Instructions for Keyboard
N/A - No UI changes.
Screenshots or screencast
N/A - Internal code changes only.