Class Timing
Index
Constructors
Methods
Methods
Staticdebounce
Wraps a callback in a debounced timeout. Delay execution of the callback function until the function has not been called for the given delay in milliseconds.
Type Parameters
- Args
Parameters
- callback: (...args: Args[]) => void
A function to execute once the debounced threshold has been passed.
- delay: number
An amount of time in milliseconds to delay.
Returns (...args: Args[]) => void
A wrapped function that can be called to debounce execution.
StaticdoubleClick
- doubleClick(
opts: {
delay?: number;
double?: (event: Event) => void;
single?: (event: Event) => void;
},
): (event: Event) => voidCreates a double click event handler that distinguishes between single and double clicks. Calls the
singlecallback on a single click and thedoublecallback on a double click. The default double click delay to invoke thedoublecallback is 400 milliseconds.Parameters
Returns (event: Event) => void
The gated double-click handler.
Provides timing related higher-order functions.
This class should not be constructed as it only contains static methods.