import IODefinitions from './core/definitions.cjs'; import IODocument from './core/document.cjs'; import IOObject from './core/internet-object.cjs'; import IOSchema from './schema/schema.cjs'; import './core/header.cjs'; import './core/section-collection.cjs'; import './core/section.cjs'; import './core/collection.cjs'; import './schema/types/memberdef.cjs'; import './schema/schema-types.cjs'; /** * Parses a string (template literal) as an Internet Object document and returns a Document instance. * * @example * const doc = ioDocument` * name, age * --- * ~ Alice, 30 * ~ Bob, 40 * `; * * @param {TemplateStringsArray} strings - Template string segments. * @param {...any} args - Interpolated values. * @returns {Document} Parsed Document instance. */ declare function ioDocument(strings: TemplateStringsArray, ...args: any[]): IODocument; declare namespace ioDocument { var _a: (defs: string | IODefinitions | IOSchema | null, errorCollector?: Error[] | undefined) => (strings: TemplateStringsArray, ...args: any[]) => IODocument; export { _a as with }; } /** * Parses a string (template literal) as an Internet Object document and returns a plain JavaScript object or array. * * @example * const obj = ioObject`name, age --- ~ Alice, 30`; * // obj: [{ name: 'Alice', age: 30 }] * * @param {TemplateStringsArray} strings - Template string segments. * @param {...any} args - Interpolated values. * @returns {any} Parsed JavaScript object or array. */ declare function ioObject(strings: TemplateStringsArray, ...args: any[]): IOObject | null; declare namespace ioObject { var _a: (defs: string | IODefinitions | IOSchema | null, errorCollector?: Error[] | undefined) => (strings: TemplateStringsArray, ...args: any[]) => IOObject | null; export { _a as with }; } /** * Parses a string (template literal) as Internet Object definitions (variables, schema, etc.). * * @example * const defs = ioDefinitions` * ~ $schema: { name, age } * ~ @foo: 123 * `; * * @param {TemplateStringsArray} strings - Template string segments. * @param {...any} args - Interpolated values. * @returns {Definitions|null} Parsed Definitions instance, or null if invalid. */ declare function ioDefinitions(strings: TemplateStringsArray, ...args: any[]): IODefinitions | null; declare namespace ioDefinitions { var _a: (parentDefs: IODefinitions | null) => (strings: TemplateStringsArray, ...args: any[]) => IODefinitions | null; export { _a as with }; } /** * Parses an inline schema (template literal) and returns a Schema instance. * * @example * const schema = ioSchema`{ name: string, age: int }`; * * @param {TemplateStringsArray} strings - Template string segments. * @param {...any} args - Interpolated values. * @returns {Schema} Parsed Schema instance. */ declare function ioSchema(strings: TemplateStringsArray, ...args: any[]): IOSchema; declare namespace ioSchema { var _a: (parentDefs: IODefinitions | null) => (strings: TemplateStringsArray, ...args: any[]) => IOSchema; export { _a as with }; } /** * ## Internet Object Facade * * Unified API for all core Internet Object functionality. * * ### Aliases: * - `doc` ➔ `ioDocument` * - `defs` ➔ `ioDefinitions` * - `object` ➔ `ioObject` * - Full names also available: `document`, `definitions` * * @example * import io from 'internet-object'; * const doc = io.doc`name, age --- ~ Alice, 30`; * const defs = io.defs`$schema: { name, age }`; * * @property {typeof ioDocument} doc - Alias for ioDocument (preferred usage) * @property {typeof ioObject} object - Alias for ioObject (preferred usage) * @property {typeof ioDefinitions} defs - Alias for ioDefinitions (preferred usage) * @property {typeof ioDocument} document - Full name for ioDocument * @property {typeof ioDefinitions} definitions - Full name for ioDefinitions */ declare const io: { doc: typeof ioDocument; object: typeof ioObject; defs: typeof ioDefinitions; schema: typeof ioSchema; document: typeof ioDocument; definitions: typeof ioDefinitions; }; export { io as default, ioDefinitions, ioDocument, ioObject, ioSchema };