import { DocumentNode } from './document-node.js'; interface DocumentElementConstructor { new (owner?: DocumentElement): DocumentElement; prototype: DocumentElement; } /** * @class DocumentElement */ export interface DocumentElement extends DocumentElementClass { } /** * * @constructor DocumentElement */ export declare const DocumentElement: DocumentElementConstructor; /** * @class DocumentElement */ declare abstract class DocumentElementClass { readonly id: string; readonly owner?: DocumentElement; readonly node: DocumentNode; /** * An authoring-time override for this element's own segment in the * documentation key (see `docKeySegment`). Never exported to the schema — * it exists purely so a translation key can stay stable across renames, * and so elements with no derivable identity of their own (a * regexp-named parameter, a `contentType`-less media type, an example) * can be addressed at all. */ docKey?: string; /** * This element's own contribution to its documentation key — the * container name plus its identity (e.g. `['operations', 'delete']`), * `undefined` for an element that adds no level of its own. Subclasses * override this; nothing else needs to know how any particular element * identifies itself. */ protected get docKeySegment(): string | string[] | undefined; /** Whether this element's own key segment had to be derived from * something that isn't a stable identifier — a RegExp-named parameter, * a content type that was never declared. `extractTranslations()` * reports these so a `docKey` can be added before the key silently * changes under someone. */ get docKeyUnstable(): boolean; /** * The full documentation key as an ordered segment list, built by walking * up the `owner` chain. Deliberately never joined into a single string * for lookup purposes: a segment containing a dot (a regexp source, a * media type, a version-ish name) would otherwise be re-split into the * wrong path. Join it only to show a human (a warning, an extraction * report). */ get docKeySegments(): string[]; } export {};