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

@ -16,8 +16,6 @@ import {
WidthType,
} from "../build";
const doc = new Document();
const table = new Table({
rows: [
new TableRow({
@ -57,8 +55,12 @@ const table = new Table({
layout: TableLayoutType.FIXED,
});
doc.addSection({
children: [table],
const doc = new Document({
sections: [
{
children: [table],
},
],
});
Packer.toBuffer(doc).then((buffer) => {