Files
docx-js/src/file/paragraph/run/text-run.ts

15 lines
349 B
TypeScript
Raw Normal View History

2019-06-17 01:51:57 +01:00
import { IRunOptions, Run } from "./run";
import { Text } from "./run-components/text";
2016-03-30 03:50:53 +01:00
export class TextRun extends Run {
2019-11-21 01:02:46 +00:00
constructor(options: IRunOptions | string) {
2019-06-17 01:51:57 +01:00
if (typeof options === "string") {
super({});
this.root.push(new Text(options));
return;
}
super(options);
}
2017-03-08 21:49:41 +00:00
}