Browse Source

无jira任务 补充类型

es6
jian 2 years ago
parent
commit
d355e5113a
  1. 9
      packages/fineui/typescript/core/base.ts

9
packages/fineui/typescript/core/base.ts

@ -320,14 +320,7 @@ export declare function once(func: Function): Function;
export declare function partial(func: Function, ...partials: any): Function; export declare function partial(func: Function, ...partials: any): Function;
// from @types/lodash export declare function debounce<T extends Function>(func: T, wait?: number, options?: any): T;
interface DebouncedFunc<T extends (...args: any[]) => any> {
(...args: Parameters<T>): ReturnType<T> | undefined;
cancel(): void;
flush(): ReturnType<T> | undefined;
}
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait?: number, options?: any): DebouncedFunc<T>;
export declare function throttle<T extends Function>(func: T, wait?: number, options?: any): T; export declare function throttle<T extends Function>(func: T, wait?: number, options?: any): T;

Loading…
Cancel
Save