Description
This is a repeat of #72806, albeit in the @wordpress/data package this time.
import meta types for the creation of and working with Redux stores from "@wordpress/data" used to work when using the Node16 resolution mode in TypeScript. It (tsc) now cannot resolve the types.
The source of the issue is the addition of the exports field in it's package.json file in f064f92
Unfortunately, the solution to the problem isn't as simple as it was for #72806, so my proposed additions to the package.json file are a bit messier.
I'll have a PR that makes that change up shortly
PR is here: #73265
Step-by-step reproduction instructions
- Add the import like
import type {ActionCreator, ReduxStoreConfig} from "@wordpress/data/build-types/types"; to a typescript file in a project using Node16 moduleResolution
- Prior to the addition of the
exports field, this would have worked
- Try to build it
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
Description
This is a repeat of #72806, albeit in the @wordpress/data package this time.
import meta types for the creation of and working with Redux stores from "@wordpress/data" used to work when using the Node16 resolution mode in TypeScript. It (tsc) now cannot resolve the types.
The source of the issue is the addition of the
exportsfield in it's package.json file in f064f92Unfortunately, the solution to the problem isn't as simple as it was for #72806, so my proposed additions to the package.json file are a bit messier.
I'll have a PR that makes that change up shortlyPR is here: #73265
Step-by-step reproduction instructions
import type {ActionCreator, ReduxStoreConfig} from "@wordpress/data/build-types/types";to a typescript file in a project using Node16 moduleResolutionexportsfield, this would have workedScreenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.