import { ThrottleOptions } from "../types/index.cjs"; //#region src/function/debounce.d.ts /** * Creates a debounced function that delays invoking func until after wait milliseconds * have elapsed since the last time the debounced function was invoked. * * @template T - The type of the function to debounce * @param func - The function to debounce * @param wait - The number of milliseconds to delay (default: 0) * @param options - The options object * @param options.leading - Specify invoking on the leading edge of the timeout (default: false) * @param options.trailing - Specify invoking on the trailing edge of the timeout (default: true) * @param options.maxWait - The maximum time func is allowed to be delayed before it's invoked * @returns Returns the new debounced function * * @example * const debounced = debounce(() => console.log('Hello'), 1000); * debounced(); // Will log 'Hello' after 1 second * debounced(); // Resets the timer * * @example * // With leading option * const debounced = debounce(() => console.log('Hello'), 1000, { leading: true }); * debounced(); // Logs 'Hello' immediately, then waits 1 second before allowing next call */ declare function debounce unknown>(func: T, wait?: number, options?: ThrottleOptions): T & { cancel(): void; flush(): ReturnType; }; //#endregion export { debounce }; //# sourceMappingURL=debounce.d.cts.map