UNPKG

docxml

Version:

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

33 lines (32 loc) 1.26 kB
import './Text.js'; import { type ComponentAncestor, Component, ComponentContext } from '../classes/Component.js'; import { type ChangeInformation } from '../utilities/changes.js'; import { type Text } from './Text.js'; import { type TextAddition } from './TextAddition.js'; /** * A type describing the components accepted as children of {@link TextDeletion}. */ export declare type TextDeletionChild = Text | TextDeletion | TextAddition; /** * A type describing the props accepted by {@link TextDeletion}. */ export declare type TextDeletionProps = ChangeInformation; /** * A component that represents a change-tracked text that was deleted. */ export declare class TextDeletion extends Component<TextDeletionProps, TextDeletionChild> { static readonly children: string[]; static readonly mixed: boolean; /** * Creates an XML DOM node for this component instance. */ toNode(ancestry: ComponentAncestor[]): Promise<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, context: ComponentContext): TextDeletion; }