UNPKG

docx

Version:

Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

19 lines (14 loc) 469 B
import { IViewWrapper } from "../document-wrapper"; import { File } from "../file"; import { IXmlableObject } from "./xmlable-object"; export interface IContext { readonly file: File; readonly viewWrapper: IViewWrapper; } export abstract class BaseXmlComponent { protected readonly rootKey: string; constructor(rootKey: string) { this.rootKey = rootKey; } public abstract prepForXml(context: IContext): IXmlableObject | undefined; }