import IOCollection from './collection.cjs'; import IOObject from './internet-object.cjs'; /** * IOSection represents a single data section within an Internet Object document. * * Each section can: * - Have an optional name for multi-section documents * - Reference a schema definition by name * - Contain either a single IOObject or an IOCollection of items * - Track parsing/validation errors specific to the section's data * * @template T The type of data items stored in the section * * @example * ```typescript * // Named section with schema reference * // --- users: $person * const section = new IOSection(userCollection, 'users', '$person'); * * console.log(section.name); // 'users' * console.log(section.schemaName); // '$person' * console.log(section.data); // IOCollection of user objects * ``` */ declare class IOSection { private _data; private _name?; private _schemaName?; constructor(data: any, name?: string, _schemaName?: string); get name(): string | undefined; get schemaName(): string | undefined; get data(): IOCollection | IOObject | null; get errors(): Error[]; /** * Converts the section data to a plain JavaScript object. * Delegates to the underlying data's `toObject` method if available. * * @param options - Conversion options. * @param options.skipErrors - If true, excludes error objects from collection output. * @returns The plain object representation of the section data. */ toObject(options?: { skipErrors?: boolean; }): any; /** * Alias for `toObject()`. * Provides compatibility with `JSON.stringify()`. */ toJSON(options?: { skipErrors?: boolean; }): any; } export { IOSection as default };