UNPKG

@data-client/normalizr

Version:

Normalizes and denormalizes JSON according to schema for Redux and Flux applications

20 lines (18 loc) 438 B
import type { EntityInterface } from '../interface.js'; import { EntityPath } from '../types.js'; export default interface Cache { getEntity( pk: string, schema: EntityInterface, entity: any, computeValue: (localCacheKey: Map<string, any>) => void, ): object | undefined | symbol; getResults( input: any, cachable: boolean, computeValue: () => any, ): { data: any; paths: EntityPath[]; }; }