docxml
Version:
TypeScript (component) library for building and parsing a DOCX file
31 lines (30 loc) • 1.1 kB
TypeScript
import { type ComponentAncestor, Component, ComponentContext } from '../classes/Component.js';
/**
* A type describing the components accepted as children of {@link FieldRangeInstruction}.
*/
export declare type FieldRangeInstructionChild = string;
/**
* A type describing the props accepted by {@link FieldRangeInstruction}.
*/
export declare type FieldRangeInstructionProps = {
[key: string]: never;
};
/**
* An instruction in a complex field.
*/
export declare class FieldRangeInstruction extends Component<FieldRangeInstructionProps, FieldRangeInstructionChild> {
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): FieldRangeInstruction;
}