Make .addSection fully declarative

This commit is contained in:
Dolan
2021-03-19 20:53:56 +00:00
parent 4783812044
commit 3299c557a0
86 changed files with 3341 additions and 3278 deletions

View File

@ -3,15 +3,17 @@
import * as fs from "fs";
import { Document, Packer, Paragraph } from "../build";
const doc = new Document();
doc.addSection({
children: [
new Paragraph("Hello World"),
new Paragraph({
text: "Hello World on another page",
pageBreakBefore: true,
}),
const doc = new Document({
sections: [
{
children: [
new Paragraph("Hello World"),
new Paragraph({
text: "Hello World on another page",
pageBreakBefore: true,
}),
],
},
],
});