Skip to content

Addition to your PR #1

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

Closed
wants to merge 4 commits into from

Conversation

Igorbek
Copy link

@Igorbek Igorbek commented Mar 18, 2016

My addition to your PR reduxjs#1526
Take it if it makes sense for you.

@@ -271,7 +267,7 @@ export interface MiddlewareAPI<S> {
* asynchronous API call into a series of synchronous actions.
*/
export interface Middleware {
<S>(api: MiddlewareAPI<S>): (next: MiddlewareDispatch) => MiddlewareDispatch;
<S>(api: MiddlewareAPI<S>): (next: Dispatch<S>) => any;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not Dispatch<S> as result too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A middleware can return any result. Take a look to redux-thunk and redux-promise implementations.

@use-strict
Copy link
Owner

I'm closing this because it's already contained in your other PR.

@use-strict use-strict closed this Mar 24, 2016
@Igorbek
Copy link
Author

Igorbek commented Mar 24, 2016

Sure.

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