@data-client/normalizr
Version:
Normalizes and denormalizes JSON according to schema for Redux and Flux applications
10 lines • 613 B
TypeScript
import type { Schema, SchemaSimple, GetIndex, GetEntity } from './interface.js';
import type { 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