UNPKG

@mui/x-data-grid

Version:

The Community plan edition of the Data Grid components (MUI X).

20 lines 957 B
type AnyNonNullishValue = NonNullable<unknown>; type Simplify<T> = T extends AnyFunction ? T : { [KeyType in keyof T]: T[KeyType] } & AnyNonNullishValue; type EqualityFn<T = any> = (a: T, b: T) => boolean; type DefaultMemoizeFields = { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }; type AnyFunction = (...args: any[]) => any; interface WeakMapMemoizeOptions<Result = any> { resultEqualityCheck?: EqualityFn<Result>; } /** * Inspired by the `weakMapMemoize` function from the `reselect` library. * * @see {@link https://github.com/reduxjs/reselect/blob/1c3fc05f041d32cd69c11a7f7deccf0bce6f4598/src/weakMapMemoize.ts `original source code`} * @see {@link https://reselect.js.org/api/weakMapMemoize `weakMapMemoize api docs`} */ export declare function weakMapMemoize<Func extends AnyFunction>(func: Func, options?: WeakMapMemoizeOptions<ReturnType<Func>>): Func & Simplify<DefaultMemoizeFields>; export {};