From 09e59a83c101f6494b7891125778ef61081e2eda Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Tue, 7 Jan 2025 22:30:40 +0900 Subject: [PATCH] Update vanilla.ts --- src/vanilla.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vanilla.ts b/src/vanilla.ts index 71f2cdd92c..a20f0f8ca5 100644 --- a/src/vanilla.ts +++ b/src/vanilla.ts @@ -1,5 +1,3 @@ -export type ExtractState = S extends { getState: () => infer T } ? T : never - type SetStateInternal = { _( partial: T | Partial | { _(state: T): T | Partial }['_'], @@ -15,6 +13,8 @@ export interface StoreApi { subscribe: (listener: (state: T, prevState: T) => void) => () => void } +export type ExtractState = S extends { getState: () => infer T } ? T : never + type Get = K extends keyof T ? T[K] : F export type Mutate = number extends Ms['length' & keyof Ms]