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

Improving return types of action creators by adding generic args type #243

Merged
merged 2 commits into from Feb 7, 2019
Merged

Improving return types of action creators by adding generic args type #243

merged 2 commits into from Feb 7, 2019

Conversation

salguerooo
Copy link
Contributor

The reason for this is to have better autocomplete on the created actions.
It seems like a very niche use, but I ran into it and would like to have better autocompletes.

Also improves the LocationState type inside LocationDescriptorObject, before it was aways any.

@supasate
Copy link
Owner

supasate commented Feb 5, 2019

Hi @salguerooo. Sorry for my delayed response. Is there any backward compatibility issue that we should be aware of?

@salguerooo
Copy link
Contributor Author

Hey @supasate, Hmm there might be if someone is implementing the CallHistoryMethodAction and LocationActionPayload interfaces, I can't find a reason anyone would do that, but one way of making it backwards compatible would be to default those generics to any, something like export interface LocationActionPayload<A = any> {

Should I do the change?

@salguerooo
Copy link
Contributor Author

Hey @supasate, I made the changes, what do you think?

@supasate
Copy link
Owner

supasate commented Feb 7, 2019

LGTM

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.

None yet

2 participants