UNPKG

throttle-typescript

Version:

Helper that returns a throttled function (TypeScript types included - works without TypeScript also)

7 lines (6 loc) 328 B
import { ThrottledFunction } from './throttled-function'; /** * Creates a throttled function that only invokes the provided function (`func`) at most once per within a given number of milliseconds * (`limit`) */ export declare function throttle<T extends (...args: any) => any>(func: T, limit: number): ThrottledFunction<T>;