DebouncedFunction
import { DebouncedFunction } from "jsr:@ende/async";interface
interface DebouncedFunction<T extends Array<unknown>>A debounced function whose execution is delayed by a given wait
time in milliseconds. If the function is called again before
the timeout expires, the previous call will be aborted.
Call signatures
Call signature
(...args: T): voidProperties
pending
readonly pending: booleanReturns a boolean whether a debounce call is pending or not.
Methods
clear
clear(): voidClears the debounce timeout and omits calling the debounced function.
flush
flush(): voidClears the debounce timeout and calls the debounced function immediately.