diff --git a/types/index.d.ts b/types/index.d.ts
index 82593d048..ef2a6a45b 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -18,8 +18,8 @@ export declare class Store {
dispatch: Dispatch;
commit: Commit;
- subscribe
(fn: (mutation: P, state: S) => any): () => void; - subscribeAction
(fn: SubscribeActionOptions
): () => void; + subscribe
(fn: (mutation: P, state: S) => any, options?: SubscribeOptions): () => void; + subscribeAction
(fn: SubscribeActionOptions
, options?: SubscribeOptions): () => void;
watch = (action: P, state: S) => any;
export interface ActionSubscribersObject {
diff --git a/types/test/index.ts b/types/test/index.ts
index 288a5737f..8caac47cd 100644
--- a/types/test/index.ts
+++ b/types/test/index.ts
@@ -39,6 +39,8 @@ namespace StoreInstance {
state.value;
});
+ store.subscribe(() => {}, { prepend: true });
+
store.subscribeAction((action, state) => {
action.type;
action.payload;
@@ -74,6 +76,8 @@ namespace StoreInstance {
}
});
+ store.subscribeAction({}, { prepend: true });
+
store.replaceState({ value: 10 });
}