/** * Type coercion helpers for Native format encoding. * Validates and converts JavaScript values to ClickHouse-compatible types. * Throws TypeError/RangeError for values that cannot be safely coerced. */ import { type TypedArray } from "./types.ts"; /** * Coerce value to number. Handles boolean, bigint, null, and string. * Note: TypedArrays wrap/truncate on overflow; validate ranges to avoid silent corruption. */ export declare function toNumber(v: unknown): number; /** * Coerce value to bigint. Handles boolean, number, null. */ export declare function toBigInt(v: unknown): bigint; export declare const UINT16_MAX = 65535; export declare const INT32_MIN = -2147483648; export declare const INT32_MAX = 2147483647; export declare const UINT32_MAX = 4294967295; export declare const INT64_MIN: bigint; export declare const INT64_MAX: bigint; export declare const INT128_MIN: bigint; export declare const INT128_MAX: bigint; export declare const UINT128_MAX: bigint; export declare const INT256_MIN: bigint; export declare const INT256_MAX: bigint; export declare const UINT256_MAX: bigint; export declare function toBigIntInRange(v: unknown, typeName: string, min: bigint, max: bigint): bigint; export declare const toUInt8: (v: unknown) => number; export declare const toInt8: (v: unknown) => number; export declare const toUInt16: (v: unknown) => number; export declare const toInt16: (v: unknown) => number; export declare const toUInt32: (v: unknown) => number; export declare const toInt32: (v: unknown) => number; export declare const toUInt64: (v: unknown) => bigint; export declare const toInt64: (v: unknown) => bigint; export declare function coerceToString(v: unknown): string; export declare function toBool(v: unknown): number; export declare function toValidDate(v: unknown, typeName: string): Date; export declare const IPV4_REGEX: RegExp; export declare function toValidIPv4(v: unknown): string; export declare function toValidIPv6(v: unknown): string; export declare function toValidUUID(v: unknown): string; export declare function toValidDecimal(v: unknown): string; /** Check if value is an array-like (regular array or TypedArray) */ export declare function isArrayLike(v: unknown): v is unknown[] | TypedArray; //# sourceMappingURL=coercion.d.ts.map