diff --git a/index.d.ts b/index.d.ts index d135597..d916bd8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -44,7 +44,7 @@ export type Options = { readonly strict?: boolean; /** - Get notified when function calls are delayed due to exceeding the `limit` of allowed calls within the given `interval`. + Get notified when function calls are delayed due to exceeding the `limit` of allowed calls within the given `interval`. The delayed call arguments are passed to the `onDelay` callback. Can be useful for monitoring the throttling efficiency. @@ -69,7 +69,7 @@ export type Options = { await throttled(5, 6); //=> Executing with 1 2... //=> Executing with 3 4... - //=> Reached interval limit, call is delayed for 3 4 + //=> Reached interval limit, call is delayed for 5 6 //=> Executing with 5 6... ``` */ diff --git a/readme.md b/readme.md index 70296eb..176ff31 100644 --- a/readme.md +++ b/readme.md @@ -79,7 +79,7 @@ Use a strict, more resource intensive, throttling algorithm. The default algorit Type: `Function` -Get notified when function calls are delayed due to exceeding the `limit` of allowed calls within the given `interval`. +Get notified when function calls are delayed due to exceeding the `limit` of allowed calls within the given `interval`. The delayed call arguments are passed to the `onDelay` callback. Can be useful for monitoring the throttling efficiency. @@ -105,7 +105,7 @@ await throttled(3, 4); await throttled(5, 6); //=> Executing with 1 2... //=> Executing with 3 4... -//=> Reached interval limit, call is delayed for 3 4 +//=> Reached interval limit, call is delayed for 5 6 //=> Executing with 5 6... ```