Skip to content

Commit a4bd081

Browse files
FOODyktsn
authored andcommitted
fix(typings): watch() returns an unwatch function (#922)
1 parent 80b856a commit a4bd081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export declare class Store<S> {
1818
commit: Commit;
1919

2020
subscribe<P extends MutationPayload>(fn: (mutation: P, state: S) => any): () => void;
21-
watch<T>(getter: (state: S) => T, cb: (value: T, oldValue: T) => void, options?: WatchOptions): void;
21+
watch<T>(getter: (state: S) => T, cb: (value: T, oldValue: T) => void, options?: WatchOptions): () => void;
2222

2323
registerModule<T>(path: string, module: Module<T, S>): void;
2424
registerModule<T>(path: string[], module: Module<T, S>): void;

0 commit comments

Comments
 (0)