浏览代码

improve type test for subscribe

Evan You 8 年之前
父节点
当前提交
112b6b7f37
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      types/test/index.ts

+ 2 - 1
types/test/index.ts

@@ -198,7 +198,8 @@ namespace TestSubscribe {
     state.count += 1;
     state.count += 1;
   };
   };
 
 
-  store.subscribe(handler);
+  const unsubscribe = store.subscribe(handler);
+  unsubscribe();
 }
 }
 
 
 namespace TestLogger {
 namespace TestLogger {