timeout-flow 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/debounce.js +2 -2
- package/types/debounce.d.ts +3 -3
package/package.json
CHANGED
package/src/debounce.js
CHANGED
|
@@ -12,8 +12,8 @@ import { resolveDelayAndFn } from './resolveDelayAndFn.js';
|
|
|
12
12
|
/**
|
|
13
13
|
* Creates a debounced function that delays invoking `fn` until after `delay` ms.
|
|
14
14
|
*
|
|
15
|
-
* @param {number|Function} a - Delay in ms or the function to debounce
|
|
16
|
-
* @param {Function} [b] - The function to debounce, if delay is first
|
|
15
|
+
* @param {string|number|Function} a - Delay in ms or the function to debounce.
|
|
16
|
+
* @param {string|number|Function} [b] - The function to debounce, if delay is first
|
|
17
17
|
* @returns {DebouncedFunction} A debounced function with `.cancel()`
|
|
18
18
|
*/
|
|
19
19
|
export function debounce(a, b) {
|
package/types/debounce.d.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a debounced function that delays invoking `fn` until after `delay` ms.
|
|
6
6
|
*
|
|
7
|
-
* @param {number|Function} a - Delay in ms or the function to debounce
|
|
8
|
-
* @param {Function} [b] - The function to debounce, if delay is first
|
|
7
|
+
* @param {string|number|Function} a - Delay in ms or the function to debounce.
|
|
8
|
+
* @param {string|number|Function} [b] - The function to debounce, if delay is first
|
|
9
9
|
* @returns {DebouncedFunction} A debounced function with `.cancel()`
|
|
10
10
|
*/
|
|
11
|
-
export function debounce(a: number | Function, b?: Function): DebouncedFunction;
|
|
11
|
+
export function debounce(a: string | number | Function, b?: string | number | Function): DebouncedFunction;
|
|
12
12
|
export type DebouncedFunction = ((...args: any[]) => void) & {
|
|
13
13
|
cancel: () => void;
|
|
14
14
|
};
|