a-js-tools 1.0.5 → 1.0.6
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 +2 -2
- package/src/performance.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"name": "a-js-tools",
|
|
5
5
|
"description": "一点点 🤏 js 函数",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"a-type-of-js": "^1.0.
|
|
8
|
+
"a-type-of-js": "^1.0.4"
|
|
9
9
|
},
|
|
10
10
|
"main": "index.cjs",
|
|
11
11
|
"module": "index.mjs",
|
package/src/performance.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @module @a-js-tools/performance
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
type Callback = (...args:
|
|
8
|
+
type Callback = (...args: any[]) => void;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
11
|
* 节流和防抖返回值类型
|
|
@@ -38,7 +38,7 @@ export type debounce_throttle_options = {
|
|
|
38
38
|
* }
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
|
-
export declare function debounce<F extends
|
|
41
|
+
export declare function debounce<F extends Callback>(callback: F, options?: debounce_throttle_options): DebounceAndThrottleReturnType<F>;
|
|
42
42
|
/**
|
|
43
43
|
* 节流
|
|
44
44
|
*
|
|
@@ -46,5 +46,5 @@ export declare function debounce<F extends (...args: unknown[]) => void>(callbac
|
|
|
46
46
|
* @param options 延迟时间(毫秒),默认 200 (ms) 或设置 this
|
|
47
47
|
* @returns 返回的闭包函数
|
|
48
48
|
*/
|
|
49
|
-
export declare function throttle<F extends
|
|
49
|
+
export declare function throttle<F extends Callback>(callback: F, options?: debounce_throttle_options): DebounceAndThrottleReturnType<F>;
|
|
50
50
|
export {};
|