Skip to content

Commit 4eb7404

Browse files
author
Wang Zhongliang
committed
Remove unnecessary default values for some generic types
1 parent b9d9000 commit 4eb7404

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import { Middleware, Action, AnyAction } from "redux";
22

33

4-
export type ThunkAction<R, S = {}, E = {}, A extends Action<any> = AnyAction> = (
4+
export type ThunkAction<R, S, E, A extends Action> = (
55
dispatch: ThunkDispatch<S, E, A>,
66
getState: () => S,
77
extraArgument: E
88
) => R;
99

10-
interface ThunkDispatch<S = {}, E = {}, A extends Action = AnyAction> {
10+
interface ThunkDispatch<S, E, A extends Action> {
1111
<T extends A>(action: T): T;
1212
}
1313

14-
interface ThunkDispatch<S = {}, E = {}, A extends Action = AnyAction> {
14+
interface ThunkDispatch<S, E, A extends Action> {
1515
<R>(asyncAction: ThunkAction<R, S, E, A>): R;
1616
}
1717

18-
type ThunkMiddleware<E, S = {}> = Middleware<ThunkDispatch<S, E>, S, ThunkDispatch<S, E>>;
18+
type ThunkMiddleware<E, S = {}, A extends Action = AnyAction> = Middleware<ThunkDispatch<S, E, A>, S, ThunkDispatch<S, E, A>>;
1919

2020
declare const thunk: ThunkMiddleware<undefined> & {
2121
withExtraArgument<E>(extraArgument: E): ThunkMiddleware<E>

0 commit comments

Comments
 (0)