Fourth-assignment-vue/node_modules/memoize-one/dist/memoize-one.d.ts

8 lines
512 B
TypeScript
Raw Normal View History

2024-11-08 03:03:26 +00:00
export declare type EqualityFn<TFunc extends (...args: any[]) => any> = (newArgs: Parameters<TFunc>, lastArgs: Parameters<TFunc>) => boolean;
export declare type MemoizedFn<TFunc extends (this: any, ...args: any[]) => any> = {
clear: () => void;
(this: ThisParameterType<TFunc>, ...args: Parameters<TFunc>): ReturnType<TFunc>;
};
declare function memoizeOne<TFunc extends (this: any, ...newArgs: any[]) => any>(resultFn: TFunc, isEqual?: EqualityFn<TFunc>): MemoizedFn<TFunc>;
export default memoizeOne;