import { ReadonlyStore, Store, StoreActionMap, StoreActionsFactory } from "@tanstack/store"; //#region src/useCreateStore.d.ts type NonFunction = T extends ((...args: Array) => any) ? never : T; /** * Creates a stable store instance for the lifetime of the component. * * Pass an initial value to create a writable store, or a getter function to * create a readonly derived store. This mirrors {@link createStore}, but only * creates the store once per component mount. * * @example * ```tsx * function Counter() { * const counterStore = useCreateStore({ count: 0 }) * const count = useSelector(counterStore, (state) => state.count) * const setState = useSetValue(counterStore) * * return ( * * ) * } * ``` */ declare function useCreateStore(getValue: (prev?: NoInfer) => T): ReadonlyStore; declare function useCreateStore(initialValue: T): Store; declare function useCreateStore(initialValue: NonFunction, actions: StoreActionsFactory): Store; //#endregion export { useCreateStore }; //# sourceMappingURL=useCreateStore.d.cts.map