Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[core-data] Document and add types for dynamic actions and selectors. #67668
base: trunk
Are you sure you want to change the base?
[core-data] Document and add types for dynamic actions and selectors. #67668
Changes from all commits
d06bc58
b3778a3
0b72ca3
3928817
9280cce
9f6b4e3
c583805
8bf0ea5
0de4023
0096e00
a6612e6
bea1374
5293486
105423a
1a45990
fa2a98b
5a09cec
1f5bd67
ca6550a
7b23643
465521b
a4fea0b
70f681e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a
let
necessary for some reason? Can't we just useconst
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For
const
, you need to assign the value. Since the value is actually undefined and only the type is set, it's fine.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming that regardless of its
wp_options
origin, this one is actually a number because it gets additional treatment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming that regardless of its
wp_options
origin, this one is actually a number because it gets additional treatment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, with regards to keeping the alphabetic order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't most (if not all) of these actually optional?
See:
https://github.com/WordPress/wordpress-develop/blob/80112f24ab0d0edce44097e4ed21ecdb933d8806/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php#L222-L286
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the same for user object but those fields are actually present because those are actually present in the item schema.
https://github.com/WordPress/wordpress-develop/blob/016bbeca9bfe96b3e024441059b76a3ad7d31df9/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php#L998-L1076
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Statuses can also have
_links
, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have links defined in any of the objects here.