import { IToXmlOptions } from './options'; import { IElement } from './util'; /** * Value object. */ export declare abstract class Value { /** * Value type. */ static readonly TYPE: string; /** * Tag names. */ static readonly TAG_NAMES: string[]; /** * Value constructor. */ constructor(); /** * Value type. * * @returns Type string. */ get type(): string; /** * Cast to specific type or null. * * @param Type Type constructor. * @returns This object or null. */ castTo(Type: T): T['prototype'] | null; /** * Cast to specific type or throw. * * @param Type Type constructor. * @returns This object. */ castAs(Type: T): T['prototype']; /** * Decode document from string. * * @param xml XML string. */ fromXml(xml: string): void; /** * Decode value from element. * * @param element XML element. */ abstract fromXmlElement(element: Readonly): void; /** * Encode Value to string. * * @param options Options object. * @param depth Indent depth. * @returns Xml string. */ abstract toXml(options?: Readonly | null, depth?: number): string; }