graphic-pixi/lib/utils/debounce.d.ts
2023-12-14 13:07:43 +08:00

6 lines
288 B
TypeScript

export interface DebouncedFunction<F extends (...args: any[]) => any> {
(context: ThisParameterType<F>, ...args: Parameters<F>): void;
cancel: () => void;
}
export declare function debounce<F extends (...args: Parameters<F>) => any>(fn: F, waitMs?: number): DebouncedFunction<F>;