-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Copy link
Labels
[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality
Description
Description
The meta object for Post, Comment, User etc. can be anything, and not just a record of strings as depicted by current types
If the meta for a core type is an object, TS isn't happy about it.
Step-by-step reproduction instructions
Use this snippet in some TypeScript file
useSelect( select => {
const { meta } = select( coreStore ).getEntityRecord< Post >( 'postType', 'post', 123 );
return meta.some_object.test;
}, [] );
Notice the error when reading the test
property
Screenshots, screen recording, code snippet
No response
Environment info
No response
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.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Metadata
Metadata
Assignees
Labels
[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality