Turn methods into "add()"

This commit is contained in:
Dolan
2019-06-25 23:17:56 +01:00
parent 3ef8f5311d
commit e2574ec23b
55 changed files with 253 additions and 262 deletions

View File

@ -37,7 +37,7 @@ export class Document extends XmlComponent {
this.root.push(this.body);
}
public addParagraph(paragraph: Paragraph): Document {
public add(paragraph: Paragraph | Table): Document {
this.body.push(paragraph);
return this;
}
@ -47,11 +47,6 @@ export class Document extends XmlComponent {
return this;
}
public addTable(table: Table): Document {
this.body.push(table);
return this;
}
public get Body(): Body {
return this.body;
}