Skip to content

Commit ac9244f

Browse files
authored
Also allow async functions as actions
1 parent 23dd9af commit ac9244f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface Store<K> {
1818

1919
export default function createStore<K>(state?: K): Store<K>;
2020

21-
export type ActionFn<K> = (state: K, ...args: any[]) => Partial<K> | void;
21+
export type ActionFn<K> = (state: K, ...args: any[]) => Promise<Partial<K>> | Partial<K> | void;
2222

2323
export interface ActionMap<K> {
2424
[actionName: string]: ActionFn<K>;

0 commit comments

Comments
 (0)