-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
data: Add types to redux-store/metadata/selectors #32965
Conversation
Size Change: 0 B Total Size: 1.04 MB ℹ️ View Unchanged
|
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.
Changes LGTM 🚀
Since the reducer is a .ts
file, wouldn't it be better to also have the rest of the files converted to TypeScript?
According to the TypeScript introduction rules for the repository (documented here: https://make.wordpress.org/core/2021/04/09/follow-up-to-the-native-typescript-proposal/#block-0a331f4d-0e29-4de4-95c6-8be46f703394) we should only convert files to TypeScript when it's necessary for being able to type them. Otherwise we should leave them as the original JavaScript. |
Description
Adds types to the rest of
redux-store/metadata/selectors
which finishesredux-store/metadata
.Part of #18838
How has this been tested?
Type checks pass.
Types of changes
Only one runtime change is to explicitly
return undefined
instead of justreturn;
. This isn't really a runtime change 🤷Otherwise it's only updates to the JSDocs.
Checklist:
*.native.js
files for terms that need renaming or removal).