Skip to content

Commit

Permalink
Update index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus authored Dec 6, 2023
1 parent d9c04ce commit c59edad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export type Options = {
readonly strict?: boolean;

/**
Get notified when function calls are delayed due to exceeding the `limit` of allowed calls within a the given `interval`. Can be useful for monitoring the throttling efficiency.
Get notified when function calls are delayed due to exceeding the `limit` of allowed calls within a the given `interval`.
Can be useful for monitoring the throttling efficiency.
@example
```
Expand All @@ -58,7 +60,10 @@ export type Options = {
},
});
const throttled = throttle(() => console.log('Executing...'));
const throttled = throttle(() => {
console.log('Executing...');
});
await throttled();
await throttled();
await throttled();
Expand Down

0 comments on commit c59edad

Please sign in to comment.