import type { Accessor } from 'solid-js'; export interface UseSelectorOptions { compare?: (a: TSelected, b: TSelected) => boolean; } type SelectionSource = { get: () => T; subscribe: (listener: (value: T) => void) => { unsubscribe: () => void; }; }; /** * Selects a slice of state from an atom or store and subscribes the component * to that selection. * * This is the primary Solid read hook for TanStack Store. It returns a Solid * accessor so consumers can read the selected value reactively. * * Omit the selector to subscribe to the whole value. * * @example * ```tsx * const count = useSelector(counterStore, (state) => state.count) * * return

{count()}

* ``` * * @example * ```tsx * const value = useSelector(countAtom) * ``` */ export declare function useSelector>(source: SelectionSource, selector?: (snapshot: TSource) => TSelected, options?: UseSelectorOptions): Accessor; export {};