Skip to content

Commit

Permalink
Update vanilla.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Jan 7, 2025
1 parent e9fd37c commit 09e59a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vanilla.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export type ExtractState<S> = S extends { getState: () => infer T } ? T : never

type SetStateInternal<T> = {
_(
partial: T | Partial<T> | { _(state: T): T | Partial<T> }['_'],
Expand All @@ -15,6 +13,8 @@ export interface StoreApi<T> {
subscribe: (listener: (state: T, prevState: T) => void) => () => void
}

export type ExtractState<S> = S extends { getState: () => infer T } ? T : never

type Get<T, K, F> = K extends keyof T ? T[K] : F

export type Mutate<S, Ms> = number extends Ms['length' & keyof Ms]
Expand Down

0 comments on commit 09e59a8

Please sign in to comment.