Pārlūkot izejas kodu

improve type test for subscribe

Evan You 9 gadi atpakaļ
vecāks
revīzija
8130c4fa65
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      types/test/index.ts

+ 2 - 1
types/test/index.ts

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