timeout-flow
Advanced tools
Comparing version
{ | ||
"name": "timeout-flow", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Fluent, composable, pauseable JavaScript timers and time control flows — plus RAF utilities for frame-based logic.", |
@@ -15,4 +15,4 @@ | ||
* | ||
* @param {number|Function} a - Delay in ms or the function to debounce | ||
* @param {Function} [b] - The function to debounce, if delay is first | ||
* @param {number|Function} a - Delay in ms or the function to debounce. | ||
* @param {number|Function} [b] - The function to debounce, if delay is first | ||
* @returns {DebouncedFunction} A debounced function with `.cancel()` | ||
@@ -19,0 +19,0 @@ */ |
@@ -7,9 +7,9 @@ /** | ||
* | ||
* @param {number|Function} a - Delay in ms or the function to debounce | ||
* @param {Function} [b] - The function to debounce, if delay is first | ||
* @param {number|Function} a - Delay in ms or the function to debounce. | ||
* @param {number|Function} [b] - The function to debounce, if delay is first | ||
* @returns {DebouncedFunction} A debounced function with `.cancel()` | ||
*/ | ||
export function debounce(a: number | Function, b?: Function): DebouncedFunction; | ||
export function debounce(a: number | Function, b?: number | Function): DebouncedFunction; | ||
export type DebouncedFunction = ((...args: any[]) => void) & { | ||
cancel: () => void; | ||
}; |
72737
0.03%