You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typescript type for the core-data store and notices store are returned as any #73844
When using the wp-6.8 version of the core-store package, the store variable had the types of all the actions and selectors, so when using it in useSelect for example, the types were correctly set.
However, on updating to wp-6.9, these types seem to have broken and are returning any to my project. I can see the type is set correctly when inspecting the package, it's only when importing the package that this breaks.
This could be an issue in core-data package or the data package as it seems to be linked. See my steps to reproduce below. For some reason, if you don't explicitly install the package, it shows the type as any, but if you do, it shows as the correct type. Note sure why this happens because the package version is the same and is added to the same place in node_modules.
EDIT:
I've noticed that this also happens with the @wordpress/notices package in exactly the same way.
Before:
In my file:
The export in the package:
After:
In my file:
The export in the package:
Step-by-step reproduction instructions
Not sure if applicable, but I'm using Node v20.19.6, NPM 10.8.2 and TypeScript 5.9.3 (built in with VSCode 1.106)
Create fresh folder
run npm init --yes
Install only core data package at tagged wp-6.8 version npm i --save-exact -D @wordpress/core-data@wp-6.8
Create index.ts file, add import { store } from "@wordpress/core-data"; to it.
Hover over "store" in the editor to see the type (any)
Install data package at tagged wp-6.8 version npm i --save-exact -D @wordpress/data@wp-6.8
Hover over "store" in the editor to see the type (correct type now)
Update both packages to tagged wp-6.9 version npm i --save-exact -D @wordpress/core-data@wp-6.9 @wordpress/data@wp-6.9
Hover over "store" in the editor to see the type (any)
Screenshots, screen recording, code snippet
No response
Environment info
Node v20.19.6, NPM 10.8.2 and TypeScript 5.9.3 (built in with VSCode 1.106)
MacOS 26.1 Tahoe
wp-6.8
@wordpress/core-data -> 7.19.6
@wordpress/data -> 10.19.2
wp-6.9
@wordpress/core-data -> 7.33.8
@wordpress/data -> 10.33.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Please confirm which theme type you used for testing.
changed the title [-]Typescript type for the core store is returned as any[/-][+]Typescript type for the core-data store and notices store are returned as any[/+]on Dec 9, 2025
Activity
[-]Typescript type for the core store is returned as any[/-][+]Typescript type for the core-data store and notices store are returned as any[/+]Mamaduka commentedon Jan 9, 2026
The notices packages don't have types yet, which should be fixed via #67670. Props to @manzoorwanijk
manzoorwanijk commentedon Aug 31, 2026
This should now be fixed with the above PR merged. Feel free to reopen if you still face the issue.