From 9064f7ff7412851b3528d6e5cd127d5c6ac99f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=E5=B1=8F=E5=B1=B1=E6=9C=80=E9=80=9F=E4=B8=8B?= =?UTF-8?q?=E5=B1=B1=E4=BC=A0=E8=AF=B4?= Date: Fri, 22 Dec 2023 15:20:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/typescript/core/base.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/fineui/typescript/core/base.ts b/packages/fineui/typescript/core/base.ts index 3b4efbf36..10d9794ec 100644 --- a/packages/fineui/typescript/core/base.ts +++ b/packages/fineui/typescript/core/base.ts @@ -320,7 +320,17 @@ export declare function once(func: Function): Function; export declare function partial(func: Function, ...partials: any): Function; -export declare function debounce(func: T, wait?: number, options?: any): T; + +interface DebouncedFunc any> { + + (...args: Parameters): ReturnType | undefined; + + cancel(): void; + + flush(): ReturnType | undefined; +} + +export declare function debounce any>(func: T, wait?: number, options?: any): DebouncedFunc; export declare function throttle(func: T, wait?: number, options?: any): T;