UNPKG

@normalized-db/normalizer

Version:

Normalize and restore `JavaScript` objects based on a simple schema.

5 lines (4 loc) 660 B
import type { SchemaStructure } from '../types/normalizer-config-types'; import type { DenormalizeFunction, DenormalizerFactoryOptions, DenormalizerLoader, NormalizedData, Schema } from '../types/normalizer-types'; export declare function denormalizerFactory<DataTypes extends SchemaStructure>(schema: Schema<DataTypes>, defaultOptions?: DenormalizerFactoryOptions<DataTypes, any, any>): DenormalizerLoader<DataTypes>; export declare function denormalizer<DataTypes extends SchemaStructure>(schema: Schema<DataTypes>, normalizedData: NormalizedData<DataTypes>, defaultOptions?: DenormalizerFactoryOptions<DataTypes, any, any>): DenormalizeFunction<DataTypes>;