-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
refactor typings for readability #168
Conversation
Deploy preview for redux-starter-kit-docs ready! Built with commit 93509ee https://deploy-preview-168--redux-starter-kit-docs.netlify.com |
|
||
export type ActionCreatorWithPayload<P, T extends string = string> = | ||
WithTypeProperty<T, <PT extends P>(payload: PT) => PayloadAction<PT, T>>; | ||
|
||
/** | ||
* An action creator that produces actions with a `payload` attribute. | ||
*/ | ||
export type PayloadActionCreator< | ||
P = any, |
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.
I could go and rename P to payload, T to Type and PA to PrepareActionFn here, but I'm not really sure if it makes things better or worse in the usages of these below.
Do you have an opinion there?
@markerikson what's your status on this? From my side this would be ready if you don't have any additional comments. |
I'm focusing on trying to finish the tutorials atm. Once I'm done with those, I plan to swing around and start pushing issues and PRs towards 1.0. |
Okay :) Just wanted to make sure this didn't get buried ^^ |
Sure, let's do this. |
This should make the typings more readable for someone just diving into this lib's typings, as we already discussed on twitter :)