docx
Version:
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
15 lines (12 loc) • 354 B
text/typescript
import { IRunOptions, Run } from "./run";
import { Text } from "./run-components/text";
export class TextRun extends Run {
constructor(options: IRunOptions | string) {
if (typeof options === "string") {
super({});
this.root.push(new Text(options));
return this;
}
super(options);
}
}