Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debounce ¶
func Debounce[T interface{}](fn func(args ...T), wait int, options Options) (func(args ...T), func(), func())
Creates a debounced function that delays invoking `fn` until after wait milliseconds have elapsed since the last time the debounced function was invoked. The debounced function comes with a cancel method to cancel delayed `fn` invocations and a flush method to immediately invoke them. Provide options to indicate whether `fn` should be invoked on the leading and/or trailing edge of the wait timeout. The `fn` 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.
Types ¶
Click to show internal directories.
Click to hide internal directories.