import { DuckDBType } from './DuckDBType'; import { DuckDBValue } from './values'; export type DuckDBValueConverter = (value: DuckDBValue, type: DuckDBType, converter: DuckDBValueConverter) => T | null; /** * A converter for a single DuckDB type id, whose output type is narrower than * the output type of the top-level converter it recurses through. * * `DuckDBValueConverter` ties both the return type and the recursion hook * to the same `T`. In a per-type-id converter map, only the return type varies * by id: the `converter` argument is always the map's top-level converter, so * `Nested` stays fixed while `Out` narrows. */ export type DuckDBValueConverterFor = (value: DuckDBValue, type: DuckDBType, converter: DuckDBValueConverter) => Out | null;