import { type TAnyFeature } from 'feature-core'; import type { TListenerContext, TState } from 'feature-state'; /** * Calls `callback` immediately with the current state value, then on every future change, * matching `state.subscribe()`. The callback may return a cleanup function that runs before * the next call and on unmount. Pass `null` or `undefined` as `state` to opt out without * conditionally calling the hook. */ export declare function useSubscriber(state: TState | null | undefined, callback: TUseSubscriberCallback): void; /** Receives the current listener context immediately, then on each future change. */ export type TUseSubscriberCallback = (context: TListenerContext) => (() => void) | Promise | void;