Skip to content
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

Merged
merged 3 commits into from
Sep 7, 2019

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Aug 3, 2019

This should make the typings more readable for someone just diving into this lib's typings, as we already discussed on twitter :)

@netlify
Copy link

netlify bot commented Aug 3, 2019

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,
Copy link
Member Author

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?

@phryneas
Copy link
Member Author

@markerikson what's your status on this? From my side this would be ready if you don't have any additional comments.

@markerikson
Copy link
Collaborator

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.

@phryneas
Copy link
Member Author

Okay :) Just wanted to make sure this didn't get buried ^^

@markerikson
Copy link
Collaborator

Sure, let's do this.

@markerikson markerikson merged commit 85923d4 into reduxjs:master Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants