import { type DuckDBType, type DuckDBValue } from '@duckdb/node-api'; import { type AnyDuckDBValueWrapper } from './value-wrappers-core.ts'; /** * Converts one JS value to a node-api value. The optional type is the DuckDB * type the value is bound to, taken from a wrapper's element or value type. */ export type NodeApiValueConverter = (value: unknown, typeHint?: DuckDBType) => DuckDBValue; /** * Convert a wrapper to a DuckDB Node API value. * Uses exhaustive switch for compile-time safety. */ export declare function wrapperToNodeApiValue(wrapper: AnyDuckDBValueWrapper, toValue: NodeApiValueConverter): DuckDBValue; /** * Record the declared item type of a list, array or map value, for * typedNodeApiParam() to bind it with. */ export declare function withNodeApiItemTypeHint(value: T, itemType: DuckDBType | undefined): T; /** * The type to bind a parameter with, when node-api's own inference would get * it wrong, and the value adjusted to that type. Returns undefined for values * node-api handles by itself. */ export declare function typedNodeApiParam(value: DuckDBValue): { value: DuckDBValue; type: DuckDBType; } | undefined; export { DUCKDB_VALUE_MARKER, isDuckDBWrapper, wrapArray, wrapBlob, wrapJson, wrapList, wrapMap, wrapStruct, wrapTimestamp, type AnyDuckDBValueWrapper, type DuckDBValueWrapper, type ArrayValueWrapper, type BlobValueWrapper, type JsonValueWrapper, type ListValueWrapper, type MapValueWrapper, type StructValueWrapper, type TimestampValueWrapper, type DuckDBValueKind, } from './value-wrappers-core.ts';