defaultMemoize.d.ts 590 B

1234567891011
  1. import type { EqualityFn } from './types';
  2. export declare const defaultEqualityCheck: EqualityFn;
  3. export declare function createCacheKeyComparator(equalityCheck: EqualityFn): (prev: unknown[] | IArguments | null, next: unknown[] | IArguments | null) => boolean;
  4. export interface DefaultMemoizeOptions {
  5. equalityCheck?: EqualityFn;
  6. resultEqualityCheck?: EqualityFn;
  7. maxSize?: number;
  8. }
  9. export declare function defaultMemoize<F extends (...args: any[]) => any>(func: F, equalityCheckOrOptions?: EqualityFn | DefaultMemoizeOptions): F & {
  10. clearCache: () => void;
  11. };