Skip to content

Commit 819a021

Browse files
xc1427sorrycc
authored andcommitted
fix: duplicated Dispatch definition (not allowed in ts 3.7) (#2250)
1 parent 39067c0 commit 819a021

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

packages/dva/index.d.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ import {
33
Action,
44
AnyAction,
55
ReducersMapObject,
6-
Dispatch,
76
MiddlewareAPI,
87
StoreEnhancer,
98
bindActionCreators
109
} from 'redux';
1110

1211
import { History } from "history";
1312

13+
export interface Dispatch<A extends Action = AnyAction> {
14+
<T extends A>(action: T): Promise<any> | T;
15+
}
16+
1417
export interface onActionFunc {
1518
(api: MiddlewareAPI<any>): void,
1619
}
@@ -55,10 +58,6 @@ export interface EffectsMapObject {
5558
[key: string]: Effect | EffectWithType,
5659
}
5760

58-
export interface Dispatch<A extends Action = AnyAction> {
59-
<T extends A>(action: T): Promise<any> | T;
60-
}
61-
6261
export interface SubscriptionAPI {
6362
history: History,
6463
dispatch: Dispatch<any>,

0 commit comments

Comments
 (0)