docx
Version:
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
15 lines (14 loc) • 675 B
TypeScript
import { BaseXmlComponent, IContext } from './base';
import { IXmlableObject } from './xmlable-object';
export declare const EMPTY_OBJECT: {};
export declare abstract class XmlComponent extends BaseXmlComponent {
protected root: (BaseXmlComponent | string | any)[];
constructor(rootKey: string);
prepForXml(context: IContext): IXmlableObject | undefined;
addChildElement(child: XmlComponent | string): XmlComponent;
}
export declare abstract class IgnoreIfEmptyXmlComponent extends XmlComponent {
private readonly includeIfEmpty;
constructor(rootKey: string, includeIfEmpty?: boolean);
prepForXml(context: IContext): IXmlableObject | undefined;
}