Function: throttle()
throttle<
T>(func:T,wait:number):ThrottleFn<T>
Defined in: throttle.ts:13
Creates a throttled function that only invokes func at most once per
every wait milliseconds. The throttled function comes with a flush method to
reset the last time the throttled function was invoked.
Type Parameters
| Type Parameter | 
|---|
| Textends (...args:any[]) =>any | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| func | T | The function to throttle. | 
| wait | number | The number of milliseconds to throttle invocations to. | 
Returns
ThrottleFn<T>
Returns the new throttled function.