diff --git a/types/kos-core/index.d.ts b/types/kos-core/index.d.ts index b73f9d3980..97771b779a 100644 --- a/types/kos-core/index.d.ts +++ b/types/kos-core/index.d.ts @@ -1,14 +1,15 @@ -// Type definitions for kos-core 0.4 +// Type definitions for kos-core 0.6 // Project: https://github.com/ali-Kos/Kos // Definitions by: alibaba ali-Kos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.4 import * as React from 'react'; type ReactComponent

= React.ComponentClass; interface Util { getActionType: (action: string) => { namespace: string | null; type: string }; + getParam: () => any; } interface WrapperConfig { @@ -25,7 +26,7 @@ interface Action { export interface KosProps { dispatch?: (action: Action) => void; - getParam?: () => string; + getParam?: () => any; getNamespace?: () => string; } @@ -42,7 +43,7 @@ export interface KosModel { asyncs: { [key: string]: (dispatch?: KosDispatch, getState?: GetKosState, action?: { payload: T }) => void; }; - setup?: (dispatch: KosDispatch, getState: GetKosState) => void; + setup?: (dispatch: KosDispatch, getState: GetKosState, action: { payload: { param: any } }) => void; getAsync?: ( key: string ) => (dispatch: KosDispatch, getState?: GetKosState) => void;