Turn Run into a declaritive API
This commit is contained in:
@ -6,8 +6,14 @@ import { Document, Packer, Paragraph, TextRun } from "../build";
|
||||
const doc = new Document();
|
||||
|
||||
const paragraph = new Paragraph("Hello World");
|
||||
const institutionText = new TextRun("Foo Bar").bold();
|
||||
const dateText = new TextRun("Github is the best").tab().bold();
|
||||
const institutionText = new TextRun({
|
||||
text: "Foo Bar",
|
||||
bold: true,
|
||||
});
|
||||
const dateText = new TextRun({
|
||||
text: "Github is the best",
|
||||
bold: true,
|
||||
}).tab();
|
||||
paragraph.addRun(institutionText);
|
||||
paragraph.addRun(dateText);
|
||||
|
||||
|
Reference in New Issue
Block a user