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

Declare TypeScript types #6

Merged
merged 1 commit into from Nov 12, 2019
Merged

Conversation

ankon
Copy link
Contributor

@ankon ankon commented Sep 3, 2019

Fixes #5


Note that for supporting redux 4 this will require changes:

  • drop the added dependency
  • replace Dispatch<MS> with Dispatch in the Dispatcher<MS> signature

@xuoe xuoe changed the base branch from master to next November 12, 2019 14:52
@xuoe xuoe merged commit 6af2a26 into xuoe:next Nov 12, 2019
@xuoe
Copy link
Owner

xuoe commented Nov 12, 2019

First of all, apologies for the (very) late response, and thank you for your contribution.

I made some minor changes to your commit before merging it to master. I'll look into updating this package to work with redux 4.x.x at some later time, maybe.

Thanks!

@KagamiChan
Copy link

Hi @xuoe I'm using this package with redux 4 and so far I have not observed any issue

could you please explain a little bit on the incompat? Is it only the typing issue? Maybe I could help

@ankon
Copy link
Contributor Author

ankon commented Nov 13, 2019

FWIW: We're also using redux 4, and from what I understand the only problem are those changes needed I mentioned above.

@xuoe
Copy link
Owner

xuoe commented Nov 13, 2019

@KagamiChan, to be honest, I hadn't tested it against Redux 4 and I wrongly assumed that some of the breaking changes (3rd point and the last one) would affect this package in ways I couldn't grasp at the time. Just now, after seeing the tests pass with Redux 4.0.4, I realize those changes to Redux actually benefit this package as well, so I think we're good in this regard.

Unfortunately, as @ankon said, the current TypeScript declarations are incompatible with Redux 4.0.4. Also, @ankon, the @types/redux dependency appears to be unnecessary even with Redux 3.7.2 (and probably older versions, too), so we can get rid of that as well.

I plan on making a few changes to the declarations file and then push a new patch version, which will hopefully support both >3.4.x (or thereabouts) and 4.x.x.

Thanks for not letting this slide. If you're interested, we can discuss further developments in issue #7.

@ankon ankon deleted the pr/typescript-types branch November 14, 2019 15:17
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

3 participants