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

RFC: add "match" method to actionCreator #239

Merged
merged 1 commit into from
Nov 2, 2019

Conversation

phryneas
Copy link
Member

This was triggered by #228 and inspired by https://github.com/aikoven/typescript-fsa - their actionCreators have a match method that works as a type guard and can apparently be used with redux-observable.

This would add the same to our actionCreators. What do you think?

I've added a special typeTest for that useCase: https://github.com/phryneas/redux-starter-kit/blob/actionCreator-match/type-tests/files/createAction.typetest.ts#L279-L290

@netlify
Copy link

netlify bot commented Oct 29, 2019

Deploy preview for redux-starter-kit-docs ready!

Built with commit a0b2203

https://deploy-preview-239--redux-starter-kit-docs.netlify.com

@markerikson
Copy link
Collaborator

Can you rebase this against master now that #233 got merged in?

@phryneas
Copy link
Member Author

Rebased 👍

@markerikson
Copy link
Collaborator

Looks neat!

@markerikson markerikson merged commit 77775c1 into reduxjs:master Nov 2, 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