Skip to content

Commit

Permalink
refactor: remove uneeded type guard
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Sep 30, 2024
1 parent 40275cf commit a950401
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/pinia/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a950401

Please sign in to comment.