import type { Events } from './events';
/**
 * Represents an event store which can be subscribed to listen its changes.
 *
 * This store exactly the same as accepted by
 * [React.useSyncExternalStore](https://react.dev/reference/react/useSyncExternalStore) hook.
 */
export type SyncStore = (onChange: () => void) => (() => void);
/**
 * Subscribes to a value which changes are tracked by the specified event.
 *
 * @category Hooks
 * @see {@link useEventStore}
 * @see {@link useSyncStore}
 */
export declare function useObservedProperty<E, K extends keyof E, R>(events: Events<E>, key: K, getSnapshot: () => R): R;
/**
 * An event store that never triggers any change.
 *
 * @category Utility
 */
export declare function neverSyncStore(): SyncStore;
/**
 * Creates an event store which changes when an event triggers with the specified event type.
 *
 * @category Hooks
 */
export declare function useEventStore<E, K extends keyof E>(events: Events<E> | undefined, key: K): SyncStore;
/**
 * Transforms event store in a way that the result store debounces the changes
 * until the next rendered frame via
 * [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame).
 *
 * @category Hooks
 */
export declare function useFrameDebouncedStore(subscribe: SyncStore): SyncStore;
/**
 * Same as [React.useSyncExternalStore](https://react.dev/reference/react/useSyncExternalStore)
 * with a support shim for lower React versions.
 *
 * @category Hooks
 */
export declare function useSyncStore<R>(subscribe: SyncStore, getSnapshot: () => R): R;
/**
 * Same as [React.useSyncExternalStore](https://react.dev/reference/react/useSyncExternalStore)
 * with custom equality comparison for snapshot values.
 *
 * Update will be skipped unless `equalResults()` called with previous and
 * current snapshot returns `false`.
 *
 * @category Hooks
 */
export declare function useSyncStoreWithComparator<R>(subscribe: SyncStore, getSnapshot: () => R, equalResults: (a: R, b: R) => boolean): R;
//# sourceMappingURL=hooks.d.ts.map