redux-batch
redux-batch copied to clipboard
Can you please add @types/@manaflair/redux-batch ? thanks
Can you send a PR? Thanks :)
On Tue, Aug 14, 2018, 8:06 AM Hack Hat [email protected] wrote:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/manaflair/redux-batch/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_Wa8OZ_qGYYNJNiHS4e_ji8209H2OWks5uQnbtgaJpZM4V75i4 .
I will try later.
@mpash would you mind minding your own business? Do you have stock shares in redux-saga? /s
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.
@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?
Whew! That was fast. :tada:
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.