UNPKG

docx

Version:

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

23 lines (22 loc) 1.52 kB
import { XmlComponent } from '../../xml-components'; import { FootnoteReferenceRun } from '../../footnotes/footnote/run/reference-run'; import { FieldInstruction } from '../../table-of-contents/field-instruction'; import { Break } from "./break"; import { Begin, End, Separate } from "./field"; import { IRunPropertiesOptions, RunProperties } from "./properties"; import { AnnotationReference, CarriageReturn, ContinuationSeparator, DayLong, DayShort, EndnoteReference, FootnoteReferenceElement, LastRenderedPageBreak, MonthLong, MonthShort, NoBreakHyphen, PageNumberElement, Separator, SoftHyphen, Tab, YearLong, YearShort } from "./empty-children"; import { PositionalTab } from "./positional-tab"; export interface IRunOptions extends IRunPropertiesOptions { readonly children?: readonly (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | Break | AnnotationReference | CarriageReturn | ContinuationSeparator | DayLong | DayShort | EndnoteReference | FootnoteReferenceElement | LastRenderedPageBreak | MonthLong | MonthShort | NoBreakHyphen | PageNumberElement | Separator | SoftHyphen | Tab | YearLong | YearShort | PositionalTab | string)[]; readonly break?: number; readonly text?: string; } export declare enum PageNumber { CURRENT = "CURRENT", TOTAL_PAGES = "TOTAL_PAGES", TOTAL_PAGES_IN_SECTION = "TOTAL_PAGES_IN_SECTION" } export declare class Run extends XmlComponent { protected readonly properties: RunProperties; constructor(options: IRunOptions); }