import { DataType, ValidateOptions, PrimitiveType, DefaultableType } from './types/index.js'; /** * Returns an empty object for the given type * If the type is not a record, it returns undefined */ export declare function struct(type: DataType): any; /** * Returns the default value for the given type * If no default is provided, it returns undefined * If the type is a record, it returns an object with the default values for each property */ export declare function defaultValue(type: DataType): any; /** * Assigns the values of the input to the target object if they match the data type * If the value at the input is undefined, the default is used as a fallback */ export declare function assign(type: DataType, target: any, input: any): any; /** * Encodes an input value based on the given data type * * Will accept a partial object * * TODO: evaluate if partial should be default or configurable */ export declare function encode(type: DataType, input: any): any; export declare function validateEncoded(type: DataType, encoded: any, options: ValidateOptions): { valid: boolean; error?: string; }; export declare function decode(type: DataType, encoded: any): any; export declare function collectionKeyEncode(type: DataType, input: any): string; export declare function collectionKeyDecode(type: DataType, encoded: string): any; export declare function equal(a: DataType, b: DataType): boolean; export declare function serialize(type: DataType, input: any, inputFormat: 'encoded' | 'decoded'): any; export declare function deserialize(type: DataType, input: any, outputFormat: 'encoded' | 'decoded'): any; export declare function supportedOperations(type: DataType): ReadonlyArray; /** * Checks if the type has a default value that can be configured * NOT that a default value is provided */ export declare function hasConfigurableDefault(type: DataType): type is DefaultableType; export declare function isPrimitiveType(type: DataType): type is PrimitiveType; export declare function isOptional(type: DataType): boolean;