Răsfoiți Sursa

improve type test for subscribe

Evan You 8 ani în urmă
părinte
comite
112b6b7f37
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  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 {