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

Can you please add @types/@manaflair/redux-batch ? thanks #14

Open
hackhat opened this issue Aug 14, 2018 · 6 comments
Open

Can you please add @types/@manaflair/redux-batch ? thanks #14

hackhat opened this issue Aug 14, 2018 · 6 comments

Comments

@hackhat
Copy link

hackhat commented Aug 14, 2018

No description provided.

@arcanis
Copy link
Contributor

arcanis commented Aug 14, 2018 via email

@hackhat
Copy link
Author

hackhat commented Aug 14, 2018

I will try later.

@arcanis
Copy link
Contributor

arcanis commented Jan 17, 2019

@mpash would you mind minding your own business? Do you have stock shares in redux-saga? /s

@cmfcmf
Copy link

cmfcmf commented Jan 17, 2019

To bring this back to topic, here is the definition I currently use:

declare module "@manaflair/redux-batch" {
  import { AnyAction, StoreEnhancer } from "redux";

  export const reduxBatch: StoreEnhancer<{
    dispatch: (actions: AnyAction[]) => AnyAction[],
  }>;
}

It is neither polished nor well tested, but works for me and could serve as a starting point for adding definitions in the future.

@arcanis
Copy link
Contributor

arcanis commented Jan 17, 2019

@cmfcmf Thanks! I've added it and published a 1.0.0 - can you try and let me know if it works as you would expect?

@cmfcmf
Copy link

cmfcmf commented Jan 20, 2019

Whew! That was fast. 🎉
The definitions work fine, except for one minor thing I overlooked when creating them: There is no way to specify the action type with these definitions, because I set them to AnyAction. I came up with a backwards-compatible extension which allows to specify the action type in #20.

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

No branches or pull requests

3 participants