Skip to content

TypeScript: Convert registry hooks to TS#74473

Closed
joshualip-plaudit wants to merge 1 commit into
WordPress:trunkfrom
joshualip-plaudit:update/convert-registry-provider-to-ts
Closed

TypeScript: Convert registry hooks to TS#74473
joshualip-plaudit wants to merge 1 commit into
WordPress:trunkfrom
joshualip-plaudit:update/convert-registry-provider-to-ts

Conversation

@joshualip-plaudit

Copy link
Copy Markdown
Contributor

What?

Converts the registry-related files in @wordpress/data to TypeScript

Why?

This is a step to fully converting the codebase to typescript.

How?

By converting some of the files to typescript.

@github-actions github-actions Bot added the [Package] Data /packages/data label Jan 9, 2026
@joshualip-plaudit

joshualip-plaudit commented Jan 9, 2026

Copy link
Copy Markdown
Contributor Author

@manzoorwanijk I'm trying to do the same as #70838 for the registry-provider section. Is there a source you used for the official types? My main concern are functions like resolveSelect and getResolveSelectors. At present, they're untyped and appear to be optional as a result, but the code seems to assume that they are present.

There are also some conflicting functions like useDispatch() supposedly returning useRegistry().dispatch while having an incompatible type.

There's also the undefined/unknown vs throwing something issue - adding types to these functions will break pretty much everything that references the @wordpress/data package.

(If this counts as stepping on toes, I'll drop it - I haven't done much beyond porting some work I did a while ago for some stuff I was testing)

@t-hamano t-hamano added the [Type] Code Quality Issues or PRs that relate to code quality label Jan 11, 2026
@joshualip-plaudit joshualip-plaudit deleted the update/convert-registry-provider-to-ts branch April 30, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Data /packages/data [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants