瀏覽代碼

fix(types): Add `devtools` to store options type (#1478)

Add `devtools` to store options type

test: add test case for devtools type
Alex Havermale 6 年之前
父節點
當前提交
38c11dcbae
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      types/index.d.ts
  2. 2 1
      types/test/index.ts

+ 1 - 0
types/index.d.ts

@@ -98,6 +98,7 @@ export interface StoreOptions<S> {
   modules?: ModuleTree<S>;
   plugins?: Plugin<S>[];
   strict?: boolean;
+  devtools?: boolean;
 }
 
 export type ActionHandler<S, R> = (this: Store<R>, injectee: ActionContext<S, R>, payload?: any) => any;

+ 2 - 1
types/test/index.ts

@@ -98,7 +98,8 @@ namespace RootModule {
     mutations: {
       bar (state, payload) {}
     },
-    strict: true
+    strict: true,
+    devtools: true
   });
 }