memoize-one.cjs.js.flow 343 B

1234567891011
  1. // @flow
  2. // These types are not as powerful as the TypeScript types, but they get the job done
  3. export type EqualityFn = (newArgs: mixed[], lastArgs: mixed[]) => boolean;
  4. // default export
  5. declare export default function memoizeOne<ResultFn: (...any[]) => mixed>(
  6. fn: ResultFn,
  7. isEqual?: EqualityFn,
  8. ): ResultFn & { clear: () => void };