Browse Source

chrome:update dispatch type (#5482)

pull/5489/head
hhking 7 years ago
committed by 陈帅
parent
commit
7888208389
  1. 4
      src/models/connect.d.ts

4
src/models/connect.d.ts

@ -1,4 +1,4 @@
import { AnyAction, Dispatch } from 'redux'; import { AnyAction } from 'redux';
import { MenuDataItem } from '@ant-design/pro-layout'; import { MenuDataItem } from '@ant-design/pro-layout';
import { RouterTypes } from 'umi'; import { RouterTypes } from 'umi';
import { GlobalModelState } from './global'; import { GlobalModelState } from './global';
@ -36,5 +36,5 @@ export interface Route extends MenuDataItem {
* @type T: Params matched in dynamic routing * @type T: Params matched in dynamic routing
*/ */
export interface ConnectProps<T = {}> extends Partial<RouterTypes<Route, T>> { export interface ConnectProps<T = {}> extends Partial<RouterTypes<Route, T>> {
dispatch?: Dispatch<AnyAction>; dispatch?<K = any>(action: AnyAction): K;
} }

Loading…
Cancel
Save