@data-client/normalizr
Version:
Normalizes and denormalizes JSON according to schema for Redux and Flux applications
11 lines (10 loc) • 614 B
TypeScript
import { Schema, SchemaSimple, GetIndex, GetEntity } from './interface.js';
import { NormalizeNullable } from './types.js';
/**
* Build the result parameter to denormalize from schema alone.
* Tries to compute the entity ids from params.
*/
export default function buildQueryKey<S extends Schema>(schema: S, args: readonly any[], getEntity: GetEntity, getIndex: GetIndex): NormalizeNullable<S>;
export declare function canQuery(schema: Schema): schema is Pick<SchemaSimple, 'queryKey'>;
export declare function validateQueryKey(queryKey: unknown): boolean;
//# sourceMappingURL=buildQueryKey.d.ts.map