Files
docx-js/src/file/paragraph/run/text-run.ts
2022-08-31 07:52:27 +01:00

15 lines
361 B
TypeScript

import { IRunOptions, Run } from "./run";
import { Text } from "./run-components/text";
export class TextRun extends Run {
public constructor(options: IRunOptions | string) {
if (typeof options === "string") {
super({});
this.root.push(new Text(options));
return this;
}
super(options);
}
}