UNPKG

@normalized-db/normalizer

Version:

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

7 lines (6 loc) 558 B
import type { AbstractSchemaStructure, SchemaConfig, SchemaStructure } from './types/normalizer-config-types'; import type { DenormalizerFactoryOptions, NormalizedDb, NormalizeOptions } from './types/normalizer-types'; export declare function normalizedDb<DataTypes extends SchemaStructure, AbstractDataTypes extends AbstractSchemaStructure = {}>(config: SchemaConfig<DataTypes, AbstractDataTypes>, globalOptions?: { normalize?: NormalizeOptions<DataTypes>; denormalize?: DenormalizerFactoryOptions<DataTypes, any, any>; }): NormalizedDb<DataTypes>;