es-toolkit 1.16.0-dev.486 → 1.16.0-dev.488
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.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @template F - The type of function.
|
|
7
7
|
* @param {F} func - The function to throttle.
|
|
8
8
|
* @param {number} throttleMs - The number of milliseconds to throttle executions to.
|
|
9
|
-
* @returns {F} A new throttled function that accepts the same parameters as the original function.
|
|
9
|
+
* @returns {(...args: Parameters<F>) => void} A new throttled function that accepts the same parameters as the original function.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* const throttledFunction = throttle(() => {
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
* throttledFunction(); // Will log 'Function executed'
|
|
25
25
|
* }, 1000);
|
|
26
26
|
*/
|
|
27
|
-
declare function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F;
|
|
27
|
+
declare function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): (...args: Parameters<F>) => void;
|
|
28
28
|
|
|
29
29
|
export { throttle };
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @template F - The type of function.
|
|
7
7
|
* @param {F} func - The function to throttle.
|
|
8
8
|
* @param {number} throttleMs - The number of milliseconds to throttle executions to.
|
|
9
|
-
* @returns {F} A new throttled function that accepts the same parameters as the original function.
|
|
9
|
+
* @returns {(...args: Parameters<F>) => void} A new throttled function that accepts the same parameters as the original function.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* const throttledFunction = throttle(() => {
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
* throttledFunction(); // Will log 'Function executed'
|
|
25
25
|
* }, 1000);
|
|
26
26
|
*/
|
|
27
|
-
declare function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F;
|
|
27
|
+
declare function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): (...args: Parameters<F>) => void;
|
|
28
28
|
|
|
29
29
|
export { throttle };
|
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.16.0-dev.
|
|
4
|
+
"version": "1.16.0-dev.488+647c7880",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|