Import lib/types/client/store-hook.d.ts

This commit is contained in:
QQ 2026-11-11 22:28:32 +08:00
parent c4b3f2af59
commit 0db06b2555
1 changed files with 7 additions and 0 deletions

7
lib/types/client/store-hook.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
import type { ActionsDecl, StoreInstance } from '@deepseek-ai/dsh-client-store';
/**
* Build a selector hook bound to one store instance.
* @param instance - the live store instance (snapshot source).
* @returns a `SnapshotSelectorHook`-compatible hook over that instance.
*/
export declare function createStoreHook<T, A extends ActionsDecl<T>>(instance: StoreInstance<T, A>): <S>(selector: (state: T) => S, eq?: (a: S, b: S) => boolean) => S;