فهرست منبع

improve type test for subscribe

Evan You 9 سال پیش
والد
کامیت
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;
   };
 
-  store.subscribe(handler);
+  const unsubscribe = store.subscribe(handler);
+  unsubscribe();
 }
 
 namespace TestLogger {