@data-client/normalizr
Version:
Normalizes and denormalizes JSON according to schema for Redux and Flux applications
19 lines • 964 B
TypeScript
import type { QueryPath, IndexPath, IQueryDelegate, EntitiesInterface } from '../interface.js';
import type { Dep } from '../memo/WeakDependencyMap.js';
/** Basic state interfaces for normalize side */
export declare abstract class BaseDelegate {
entities: any;
indexes: any;
constructor({ entities, indexes }: {
entities: any;
indexes: any;
});
abstract getEntities(key: string): EntitiesInterface | undefined;
abstract getEntity(key: string, pk: string): object | undefined;
abstract getIndex(...path: IndexPath): object | undefined;
abstract getIndexEnd(entity: any, value: string): string | undefined;
protected abstract getEntitiesObject(key: string): object | undefined;
tracked(schema: any): [delegate: IQueryDelegate, dependencies: Dep<QueryPath>[]];
}
export declare const getDependency: (delegate: BaseDelegate) => (path: QueryPath) => object | undefined;
//# sourceMappingURL=BaseDelegate.d.ts.map