import type { BindingDependencies } from '../binding/types/binding-dependencies'; import type { InferBindingValueTypes } from '../binding/types/infer-binding-value-types'; import type { UseBindingEffectOptions } from './types/options'; /** * Called when the associated bindings change, depending on the options provided to `useBindingEffect`. * * @param bindingValues - The extracted values of the associated named bindings. If named bindings aren't used, this will be an empty * object. * @param bindings - The original named bindings if named bindings are used or an empty object otherwise. */ export type UseBindingEffectCallback = (bindingValues: InferBindingValueTypes, bindings: DependenciesT) => void; /** * Calls the specified callback function any time any of the specified bindings are changed. * * Most of the time you should use this hook rather than addChangeListener. * * @returns a function that can be called anytime to cancel the most recent limited callback. This is useful, for example, if the the * callback would have triggered a re-render that we, by other means, know to be unnecessary. */ export declare const useBindingEffect: (bindings: DependenciesT | undefined, callback: UseBindingEffectCallback, options?: UseBindingEffectOptions) => (() => void); //# sourceMappingURL=use-binding-effect.d.ts.map