Closed mAAdhaTTah closed 5 years ago
Thanks for the initial work.
For this to be merged we need to complete all the points in the new feature checklist.
Also please remember to extend this: https://github.com/piotrwitek/typesafe-actions/blob/master/src/utils.ts#L19
For tests we need:
Added runtime tests. Will add documentation / examples, but my original thought was not to expose it to the type system, as its intended as a migration path to TS, not something you'd rely on when using it w/ TS.
Right, I agree to skip exposing it in API docs & examples for now. Please just add a comment in the code as well, saying it's redux-actions migration compatibility. I might get rid of getType interna static method in place of toString at some point as they are duplicates.
Ok, I think we're gtg here then.
Great job! Thanks a lot for all the work 🙇
This allows people migrating from redux-actions (and using
==
to coerce those actions to stringst to check againstaction.type
) to continue to do so as part of an incremental transition.Thank you for your contribution! :thumbsup:
Please makes sure that these checkboxes are checked before submitting your PR, thank you!
npm run reinstall
npm run check
Extra checklist:
#
tagFor new feature:
Left out the above because my intention wasn't necessarily to introduce this as a usable API but as a js -> ts migration path.