Skip to content

Commit 09c9dab

Browse files
38elementsktsn
authored andcommitted
Add getters to arguments of getter function on store.watch() (#1058)
1 parent 6399291 commit 09c9dab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export declare class Store<S> {
1717
commit: Commit;
1818

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

2222
registerModule<T>(path: string, module: Module<T, S>, options?: ModuleOptions): void;
2323
registerModule<T>(path: string[], module: Module<T, S>, options?: ModuleOptions): void;

0 commit comments

Comments
 (0)