Explorar o código

improve type test for subscribe

Evan You %!s(int64=9) %!d(string=hai) anos
pai
achega
112b6b7f37
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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 {