mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Fit more scenarios for @types/kos-core package (#34546)
* Update definition 'KosModel.asyncs' * Fix a type bug * Fit the new features * Update action type
This commit is contained in:
Vendored
+2
-2
@@ -20,7 +20,7 @@ interface WrapperConfig {
|
||||
|
||||
interface Action<T = any> {
|
||||
type: string;
|
||||
payload?: Partial<T>;
|
||||
payload?: Partial<T> & { [x: string]: any };
|
||||
}
|
||||
|
||||
export interface KosProps<T = any> {
|
||||
@@ -40,7 +40,7 @@ export interface KosModel<T = any> {
|
||||
[key: string]: (state: T, { payload }: { payload: T }) => void;
|
||||
};
|
||||
asyncs: {
|
||||
[key: string]: (dispatch: KosDispatch, getState: GetKosState<T>, action: Action) => void;
|
||||
[key: string]: (dispatch?: KosDispatch, getState?: GetKosState<T>, action?: { payload: T }) => void;
|
||||
};
|
||||
setup?: (dispatch: KosDispatch, getState: GetKosState<T>) => void;
|
||||
getAsync?: (
|
||||
|
||||
Reference in New Issue
Block a user