UNPKG

docxml

Version:

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

32 lines (31 loc) 1.02 kB
import { type ComponentAncestor, Component } from '../classes/Component.js'; /** * A type describing the components accepted as children of {@link Tab}. */ export declare type TabChild = never; /** * A type describing the props accepted by {@link Tab}. */ export declare type TabProps = { [key: string]: never; }; /** * A component that represents a tab space in a DOCX document. Place * this in one of the `<Text>`, `<TextAddition>` or `<TextDeletion>` components. */ export declare class Tab extends Component<TabProps, TabChild> { 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): Tab; }