react-chrono
Version:
A Modern Timeline component for React
21 lines • 1 kB
TypeScript
/**
* Creates a throttled version of a function that limits invocations
* @param fn - The function to throttle
* @param limit - The time limit in milliseconds
* @returns Throttled version of the function
*/
export declare function throttle<T extends (...args: any[]) => any>(fn: T, limit: number): (...args: Parameters<T>) => void;
/**
* Creates a debounced version of a function that delays invocation
* @param fn - The function to debounce
* @param delay - The delay in milliseconds
* @returns Debounced version of the function
*/
export declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, delay: number): (...args: Parameters<T>) => void;
/**
* Creates an RAF-throttled version of a function for smooth animations
* @param fn - The function to throttle
* @returns RAF-throttled version of the function
*/
export declare function rafThrottle<T extends (...args: unknown[]) => unknown>(fn: T): (...args: Parameters<T>) => void;
//# sourceMappingURL=throttle.d.ts.map