-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Compose: Add types (progressively) #27344
Conversation
b4afa52
to
9238527
Compare
This seems like it should return strings but it may return a number
9238527
to
fcebfd6
Compare
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.
Given that we now have native TypeScript support... should we just be re-writing these in TypeScript? It's probably a lot easier to do iteratively (one PR per file/couple of files) and would yield better results in the end.
/** | ||
* @template R | ||
* @typedef {import('react').ReducerState<R>} ReducerState | ||
*/ | ||
/** | ||
* @template R | ||
* @typedef {import('react').ReducerAction<R>} ReducerAction | ||
*/ | ||
/** | ||
* @template D | ||
* @typedef {import('react').Dispatch<D>} Dispatch | ||
*/ |
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.
Do we need these types?
Co-authored-by: sarayourfriend <sarayourfriend@fastmail.com>
Description
part of #18838
How has this been tested?
Screenshots
Types of changes
Checklist: