import type { AnyFunction } from '../mod.ts'; export interface DebouncedFunction { (this: ThisParameterType, ...args: Parameters): void; /** Cancels registered future calls if exists. */ cancel: VoidFunction; } /** * Simplest implementation of "debounce" function. * Returns function wrapper that delays original function call * until timeout since last call will be reached. * Similar to `debounce` from lodash/underscore. * * @param fn Function. * @param timeout Timeout in milliseconds. * @returns Debounced function. */ export declare function debounce(fn: T, timeout: number): DebouncedFunction;