Add BuilderElement and lang
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Attributes, XmlComponent } from "@file/xml-components";
|
||||
import { AttributeData, AttributePayload, Attributes, NextAttributeComponent, XmlComponent } from "@file/xml-components";
|
||||
|
||||
import { hpsMeasureValue } from "@util/values";
|
||||
|
||||
@ -70,3 +70,13 @@ export class StringContainer extends XmlComponent {
|
||||
this.root.push(val);
|
||||
}
|
||||
}
|
||||
|
||||
export class BuilderElement<T extends AttributeData> extends XmlComponent {
|
||||
public constructor(options: { readonly attributes?: AttributePayload<T>; readonly name: string }) {
|
||||
super(options.name);
|
||||
|
||||
if (options.attributes) {
|
||||
this.root.push(new NextAttributeComponent(options.attributes));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user