Skip to content

Commit

Permalink
Cleanup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Sep 7, 2022
1 parent 80383e3 commit 737875a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
13 changes: 6 additions & 7 deletions packages/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,12 @@ always uses timers instead of sometimes using rAF.

Creates a debounced function that delays invoking `func` until after `wait`
milliseconds have elapsed since the last time the debounced function was
invoked, or until the next browser frame is drawn. The debounced function
comes with a `cancel` method to cancel delayed `func` invocations and a
`flush` method to immediately invoke them. Provide `options` to indicate
whether `func` should be invoked on the leading and/or trailing edge of the
`wait` timeout. The `func` is invoked with the last arguments provided to the
debounced function. Subsequent calls to the debounced function return the
result of the last `func` invocation.
invoked. The debounced function comes with a `cancel` method to cancel delayed
`func` invocations and a `flush` method to immediately invoke them. Provide
`options` to indicate whether `func` should be invoked on the leading and/or
trailing edge of the `wait` timeout. The `func` is invoked with the last
arguments provided to the debounced function. Subsequent calls to the debounced
function return the result of the last `func` invocation.

**Note:** If `leading` and `trailing` options are `true`, `func` is
invoked on the trailing edge of the timeout only if the debounced function
Expand Down
13 changes: 6 additions & 7 deletions packages/compose/src/utils/debounce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ export interface DebouncedFunc< T extends ( ...args: any[] ) => any > {
*
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked, or until the next browser frame is drawn. The debounced function
* comes with a `cancel` method to cancel delayed `func` invocations and a
* `flush` method to immediately invoke them. Provide `options` to indicate
* whether `func` should be invoked on the leading and/or trailing edge of the
* `wait` timeout. The `func` is invoked with the last arguments provided to the
* debounced function. Subsequent calls to the debounced function return the
* result of the last `func` invocation.
* invoked. The debounced function comes with a `cancel` method to cancel delayed
* `func` invocations and a `flush` method to immediately invoke them. Provide
* `options` to indicate whether `func` should be invoked on the leading and/or
* trailing edge of the `wait` timeout. The `func` is invoked with the last
* arguments provided to the debounced function. Subsequent calls to the debounced
* function return the result of the last `func` invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
Expand Down

0 comments on commit 737875a

Please sign in to comment.