nhanh-pure-function 1.3.15 → 1.3.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/lib/Utility/Utility.d.ts +4 -4
- package/package.json +1 -1
package/lib/Utility/Utility.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export function _ReadFile(src: string): Promise<string>;
|
|
|
84
84
|
* @param {string} [defaultName="file"] - 默认的文件名,当无法提取时使用
|
|
85
85
|
* @returns {string} 提取到的文件名或默认的文件名
|
|
86
86
|
*/
|
|
87
|
-
export function _GetHrefName(href: string, defaultName
|
|
87
|
+
export function _GetHrefName(href: string, defaultName?: string): string;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* 下载文件
|
|
@@ -155,7 +155,7 @@ export function _GenerateUUID(prefix?: string): string;
|
|
|
155
155
|
* @param {number} delay
|
|
156
156
|
* @returns {Function}
|
|
157
157
|
*/
|
|
158
|
-
export function _Debounce<T extends
|
|
158
|
+
export function _Debounce<T extends (...args: any) => any>(
|
|
159
159
|
fn: T,
|
|
160
160
|
delay: number
|
|
161
161
|
): (...args: Parameters<T>) => void;
|
|
@@ -166,7 +166,7 @@ export function _Debounce<T extends Function>(
|
|
|
166
166
|
* @param {number} delay
|
|
167
167
|
* @returns {Function}
|
|
168
168
|
*/
|
|
169
|
-
export function _Throttle<T extends
|
|
169
|
+
export function _Throttle<T extends (...args: any) => any>(
|
|
170
170
|
fn: T,
|
|
171
171
|
delay: number
|
|
172
172
|
): (...args: Parameters<T>) => void;
|
|
@@ -286,7 +286,7 @@ export class _FileTypeChecker {
|
|
|
286
286
|
*/
|
|
287
287
|
static check(
|
|
288
288
|
url: string,
|
|
289
|
-
type: keyof typeof
|
|
289
|
+
type: keyof typeof _FileTypeChecker.fileExtensions
|
|
290
290
|
): boolean;
|
|
291
291
|
|
|
292
292
|
/**
|