import { Duration } from "./duration.js"; import { DecoratorReplacementMethod, DecoratorTargetMethod, MethodDecoratorContext } from "./decorator-helpers.js"; /** * Creates a debounce decorator that ensures a method is only called after a specified delay * has passed since the last call. Useful for handling rapid-fire events like search input. * * @param delay - The duration to wait after the last call before executing * @returns A method decorator that implements debounce behavior * @throws ArgumentException if delay is not a positive Duration * * @example * ```typescript * class Example { * @debounce(Duration.fromSeconds(1)) * async handleInput(value: string): Promise { * // This will only execute after 1 second of no calls * console.log(`Processing: ${value}`); * } * } * ``` */ export declare function debounce, Return extends Promise | void>(delay: Duration): DebounceMethodDecorator; export declare function debounce, Return extends Promise | void>(target: DecoratorTargetMethod, context: MethodDecoratorContext): DecoratorReplacementMethod; export type DebounceMethodDecorator, Return extends Promise | void> = (target: DecoratorTargetMethod, context: MethodDecoratorContext) => DecoratorReplacementMethod; //# sourceMappingURL=debounce.d.ts.map