import type { Ref } from '@stacksjs/stx'; /** * Watch a source with throttled callback invocation. * The callback is called at most once per throttle interval. * A trailing call is scheduled if changes occur during the throttle window. * * @param source - The reactive source to watch * @param callback - The callback to invoke (throttled) * @param options - Configuration options * @returns A stop function that cleans up both the watch and any pending timer * * @example * ```ts * const scrollY = ref(0) * watchThrottled(scrollY, (value) => { * updateHeader(value) * }, { throttle: 100 }) * ``` */ export declare function watchThrottled(source: Ref, callback: (value: T) => void, options?: WatchThrottledOptions): () => void; export declare interface WatchThrottledOptions { throttle?: number }