]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
refactor: remove uneeded type guard
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 30 Sep 2024 14:14:33 +0000 (16:14 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 30 Sep 2024 14:14:33 +0000 (16:14 +0200)
packages/pinia/src/types.ts

index 3a3f5da96c7a3c9485ea2acdec614da8c6e76f2c..55db69521b27804312cbbf41931eff5fca5436f6 100644 (file)
@@ -609,18 +609,14 @@ export type _ExtractStateFromSetupStore<SS> = SS extends undefined | void
  */
 export type _ExtractActionsFromSetupStore<SS> = SS extends undefined | void
   ? {}
-  : _ExtractActionsFromSetupStore_Keys<SS> extends keyof SS
-    ? Pick<SS, _ExtractActionsFromSetupStore_Keys<SS>>
-    : never
+  : Pick<SS, _ExtractActionsFromSetupStore_Keys<SS>>
 
 /**
  * For internal use **only**
  */
 export type _ExtractGettersFromSetupStore<SS> = SS extends undefined | void
   ? {}
-  : _ExtractGettersFromSetupStore_Keys<SS> extends keyof SS
-    ? Pick<SS, _ExtractGettersFromSetupStore_Keys<SS>>
-    : never
+  : Pick<SS, _ExtractGettersFromSetupStore_Keys<SS>>
 
 /**
  * Options passed to `defineStore()` that are common between option and setup