debounce

Public Function

Debounce a function.

Example
const A = debounce(myFunction, 1000)
Parameters
NameDescription

callback

(...args: T) => PromiseLike<U> | U

wait

number
Returns
{
  (...args: T): Promise<U>
  cancel(): void
}
References

PromiseLike, Promise

Edit this page
Last edited on 15 June 2023
dedupe