Specify throttle() limits. These limits shape the way throttle invokes the underlying function.
export interface Limits
|burst?||number||(Optional) The maximum number of calls to the underlying function to "burst" -- e.g. the number that can be issued immediately as long as the rate limit is not exceeded. For example, if rate is 5 and burst is 5, and 10 calls are made to the throttled function, 5 calls are made immediately and then after 1 second, another 5 calls are made immediately. Setting burst to 1 means calls are issued uniformly every |
|cache?||PersistentCache||(Optional) Similar to |
|concurrency||number||The maximum number of concurrent executions of the underlying function to allow. Must be supplied, there is no default. Specifying |
|memoize?||boolean||(Optional) If |
|rate?||number||(Optional) The maximum number of calls per second to allow to the underlying function. Default: no rate limit.|
|retry?||number | ((err: any, retries: number) => boolean)||(Optional) Retry if the throttled function returns a rejected promise. |