import type { DataTypeFactory } from "./datatype_factory.js"; import { type FieldType, type IStructuredTypeSchema, type StructuredTypeField } from "./types.js"; /** * ensure correctness of a schema object. * * @param schema * */ export declare function check_schema_correctness(schema: IStructuredTypeSchema): void; /** * initialize the value of a field, coercing/defaulting it as needed according to the field schema. * * This is a dispatch function used by every generated (and hand-written) BaseUAObject-derived * constructor across the whole monorepo, and it is always called with the value assigned directly * to a concretely-typed class field (e.g. `this.protocolVersion = initialize_field(schema.fields[0], options.protocolVersion)`). * It is declared generic so each call site keeps inferring/annotating its own concrete field type * rather than this shared helper widening every caller to `unknown`. * * @param value * @param defaultValue * @return {*} */ export declare function initialize_field(field: StructuredTypeField, value: unknown, _factory?: DataTypeFactory): T; /** * see {@link initialize_field} - same reasoning applies: generic so each of the many concretely-typed * call sites across the monorepo keeps its own element type instead of being widened to `unknown[]`. * * @param field * @param valueArray * @return */ export declare function initialize_field_array(field: FieldType, valueArrayIn: unknown, factory?: DataTypeFactory): T[] | null; //# sourceMappingURL=schema_helpers.d.ts.map