import { FunctionArgs } from '../utils/filters.js'; import { MaybeAccessor, PromisifyFn } from '../utils/types.js'; import 'solid-js'; import 'solid-js/types/reactive/signal'; /** * Throttle execution of a function. Especially useful for rate limiting * execution of handlers on events like resize and scroll. * * @see https://solidjs-use.github.io/solidjs-use/shared/useThrottleFn * @param fn A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is, * to `callback` when the throttled-function is executed. * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful. * * @param [trailing=false] if true, call fn again after the time is up * * @param [leading=true] if true, call fn on the leading edge of the ms timeout * * @param [rejectOnCancel=false] if true, reject the last call if it's been cancel * * @return A new, throttled, function. */ declare function useThrottleFn(fn: T, ms?: MaybeAccessor, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): PromisifyFn; export { useThrottleFn };