refactored out xml components into multiple files
This commit is contained in:
16
ts/docx/xml-components/unit.ts
Normal file
16
ts/docx/xml-components/unit.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import {BaseXmlComponent} from "./base";
|
||||
|
||||
export abstract class XmlUnitComponent extends BaseXmlComponent {
|
||||
protected root: string;
|
||||
|
||||
constructor(rootKey: string) {
|
||||
super(rootKey);
|
||||
}
|
||||
|
||||
replaceKey(): void {
|
||||
if (this.root !== undefined) {
|
||||
this[this.rootKey] = this.root;
|
||||
delete this.root;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user