import { InferenceFields } from "./inferenceFields.js"; import { StringDict } from "../../../../parsing/stringDict.js"; import { BaseField } from "./baseField.js"; import type { SimpleField } from "./simpleField.js"; import type { ListField } from "./listField.js"; /** * Object-valued inference field. */ export declare class ObjectField extends BaseField { /** * Nested fields carried by this object. */ readonly fields: InferenceFields; constructor(serverResponse: StringDict, indentLevel?: number); /** * Retrieves the simple sub-fields in the object. * * @return {Map} A map of field names to their corresponding `SimpleField` instances. */ get simpleFields(): Map; /** * Retrieves the list sub-fields in the object. * * @return {Map} A map of field names to their corresponding `ListField` instances. */ get listFields(): Map; /** * Retrieves the object sub-fields in the object. * * @return {Map} A map of field names to their corresponding `ObjectField` instances. */ get objectFields(): Map; /** * Retrieves a SimpleField by its name if it exists and is of the correct type. * * @param {string} fieldName - The name of the field to retrieve. * @return {SimpleField} The field instance if it exists and is valid, or undefined if not. * @throws {Error} If the field does not exist or is of wrong type. */ getSimpleField(fieldName: string): SimpleField; /** * Retrieves a ListField by its name if it exists and is of the correct type. * * @param {string} fieldName - The name of the field to retrieve. * @return {ListField} The field instance if it exists and is valid, or undefined if not. * @throws {Error} If the field does not exist or is of wrong type. */ getListField(fieldName: string): ListField; /** * Retrieves an ObjectField by its name if it exists and is of the correct type. * * @param {string} fieldName - The name of the field to retrieve. * @return {ObjectField} The field instance if it exists and is valid, or undefined if not. * @throws {Error} If the field does not exist or is of wrong type. */ getObjectField(fieldName: string): ObjectField; /** * Returns a readable representation of nested fields. */ toString(): string; /** * Returns a compact representation suitable for list items. */ toStringFromList(): string; }