import { ReflectionClass } from './reflection/reflection.js'; import { Serializer } from './serializer/serializer.js'; import { IdentifierFields } from './type-annotations.js'; /** * 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 identifiers. * * 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 identifier of a snapshot and converts to class type. */ export declare function getIdentifierExtractor(reflectionClass: ReflectionClass): (value: any) => Partial; /** * Creates a identifier 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 getIdentifierHashGenerator(reflectionClass: ReflectionClass, serializerToUse?: Serializer): (value: any) => string; export declare function getSimpleIdentifierHashGenerator(reflectionClass: ReflectionClass): (data: IdentifierFields) => string;