UNPKG

zon-format

Version:

ZON: The most token-efficient serialization format for LLMs - beats CSV, TOON, JSON, and all competitors

31 lines (30 loc) 813 B
import { ZonType } from '../core/types'; export declare class TypeInferrer { /** * Infers the ZON type of a value. * * @param value - Value to infer type for * @returns Inferred ZonType */ infer(value: any): ZonType; /** * Coerces a value to the target type. * * @param value - Value to coerce * @param targetType - Target type definition * @returns Coerced value or original value */ coerce(value: any, targetType: ZonType): any; /** * Infers the dominant type for a column of values. * * @param values - Array of values * @returns Dominant ZonType */ inferColumnType(values: any[]): ZonType; private _isNumber; private _isBoolean; private _isDate; private _isJSON; private _isISODate; }