Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dormeiri committed Aug 14, 2024
1 parent 81fc157 commit 9b68f47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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...
```
*/
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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...
```

Expand Down

0 comments on commit 9b68f47

Please sign in to comment.