es-toolkit 1.17.0-dev.504 → 1.17.0-dev.506
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.
|
@@ -9,9 +9,9 @@ interface DebounceOptions {
|
|
|
9
9
|
* @template F - The type of function.
|
|
10
10
|
* @param {F} func - The function to debounce.
|
|
11
11
|
* @param {number} debounceMs - The number of milliseconds to delay.
|
|
12
|
-
* @param {DebounceOptions} options - The options object
|
|
12
|
+
* @param {DebounceOptions} options - The options object
|
|
13
13
|
* @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.
|
|
14
|
-
* @returns {F & { cancel: () => void }} A new debounced function with a `cancel` method.
|
|
14
|
+
* @returns {((...args: Parameters<F>) => void) & { cancel: () => void }} A new debounced function with a `cancel` method.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* const debouncedFunction = debounce(() => {
|
|
@@ -36,7 +36,7 @@ interface DebounceOptions {
|
|
|
36
36
|
* // Will cancel the debounced function call
|
|
37
37
|
* controller.abort();
|
|
38
38
|
*/
|
|
39
|
-
declare function debounce<F extends (...args: any[]) => void>(func: F, debounceMs: number, { signal }?: DebounceOptions): F & {
|
|
39
|
+
declare function debounce<F extends (...args: any[]) => void>(func: F, debounceMs: number, { signal }?: DebounceOptions): ((...args: Parameters<F>) => void) & {
|
|
40
40
|
cancel: () => void;
|
|
41
41
|
};
|
|
42
42
|
|
|
@@ -9,9 +9,9 @@ interface DebounceOptions {
|
|
|
9
9
|
* @template F - The type of function.
|
|
10
10
|
* @param {F} func - The function to debounce.
|
|
11
11
|
* @param {number} debounceMs - The number of milliseconds to delay.
|
|
12
|
-
* @param {DebounceOptions} options - The options object
|
|
12
|
+
* @param {DebounceOptions} options - The options object
|
|
13
13
|
* @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.
|
|
14
|
-
* @returns {F & { cancel: () => void }} A new debounced function with a `cancel` method.
|
|
14
|
+
* @returns {((...args: Parameters<F>) => void) & { cancel: () => void }} A new debounced function with a `cancel` method.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* const debouncedFunction = debounce(() => {
|
|
@@ -36,7 +36,7 @@ interface DebounceOptions {
|
|
|
36
36
|
* // Will cancel the debounced function call
|
|
37
37
|
* controller.abort();
|
|
38
38
|
*/
|
|
39
|
-
declare function debounce<F extends (...args: any[]) => void>(func: F, debounceMs: number, { signal }?: DebounceOptions): F & {
|
|
39
|
+
declare function debounce<F extends (...args: any[]) => void>(func: F, debounceMs: number, { signal }?: DebounceOptions): ((...args: Parameters<F>) => void) & {
|
|
40
40
|
cancel: () => void;
|
|
41
41
|
};
|
|
42
42
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.17.0-dev.
|
|
4
|
+
"version": "1.17.0-dev.506+db3a8bc0",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|