UNPKG

docxml

Version:

TypeScript (component) library for building and parsing a DOCX file

36 lines (35 loc) 1.13 kB
import { type Bookmark } from '../classes/Bookmarks.js'; import { type ComponentAncestor, Component } from '../classes/Component.js'; /** * A type describing the components accepted as children of {@link BookmarkRangeEnd}. */ export declare type BookmarkRangeEndChild = never; /** * A type describing the props accepted by {@link BookmarkRangeEnd}. */ export declare type BookmarkRangeEndProps = { bookmark: Bookmark; id?: never; } | { bookmark?: never; id: number; }; /** * The end of a range associated with a comment. */ export declare class BookmarkRangeEnd extends Component<BookmarkRangeEndProps, BookmarkRangeEndChild> { static readonly children: string[]; static readonly mixed: boolean; /** * Creates an XML DOM node for this component instance. */ toNode(_ancestry: ComponentAncestor[]): Node; /** * Asserts whether or not a given XML node correlates with this component. */ static matchesNode(node: Node): boolean; /** * Instantiate this component from the XML in an existing DOCX file. */ static fromNode(node: Node): BookmarkRangeEnd; }