Turn methods into "add()"
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user