@nativescript/core
Version:
A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.
18 lines (17 loc) • 753 B
TypeScript
/**
* Creates a debounced function that delays invoking the provided function until after a specified delay
* @param fn The function to debounce
* @param delay The number of milliseconds to delay
* @param param2 Options for the debounce behavior
* @returns A new debounced function
*/
export declare function debounce(fn: any, delay?: number, { leading }?: {
leading?: boolean;
}): (...args: Array<any>) => void;
/**
* Creates a throttled function that only invokes the provided function at most once per specified delay
* @param fn The function to throttle
* @param delay The number of milliseconds to delay
* @returns A new throttled function
*/
export declare function throttle(fn: Function, delay?: number): (...args: any[]) => void;