import { ReflectionClass } from './reflection/reflection.js'; import { Serializer } from './serializer.js'; import { PrimaryKeyFields } from './reflection/type.js'; declare class SnapshotSerializer extends Serializer { name: string; protected registerSerializers(): void; } export declare const snapshotSerializer: SnapshotSerializer; /** * Creates a new JIT compiled function to convert the class instance to a snapshot. * A snapshot is essentially the class instance as `plain` serialization while references are * stored only as their primary keys. * * Generated function is cached. */ export declare function getConverterForSnapshot(reflectionClass: ReflectionClass): (value: any) => any; /** * Creates a snapshot using getConverterForSnapshot(). */ export declare function createSnapshot(reflectionClass: ReflectionClass, item: T): any; /** * Extracts the primary key of a snapshot and converts to class type. */ export declare function getPrimaryKeyExtractor(reflectionClass: ReflectionClass): (value: any) => Partial; /** * Creates a primary key hash generator that takes an item from any format * converts it to class format, then to plain, then uses the primitive values to create a string hash. * * This function is designed to work on the plain values (db records or json values) */ export declare function getPrimaryKeyHashGenerator(reflectionClass: ReflectionClass, serializerToUse?: Serializer): (value: any) => string; export declare function getSimplePrimaryKeyHashGenerator(reflectionClass: ReflectionClass): (data: PrimaryKeyFields) => string; export {};