improved type annotation for Attributes#prepForXml
This commit is contained in:
@ -16,7 +16,7 @@ export abstract class XmlAttributeComponent extends BaseXmlComponent {
|
||||
}
|
||||
}
|
||||
|
||||
public prepForXml(): object {
|
||||
public prepForXml(): {_attr: {[key: string]: (string | number | boolean)}} {
|
||||
const attrs = {};
|
||||
if (this.root !== undefined) {
|
||||
_.forOwn(this.root, (value, key) => {
|
||||
@ -26,6 +26,6 @@ export abstract class XmlAttributeComponent extends BaseXmlComponent {
|
||||
}
|
||||
});
|
||||
}
|
||||
return {[this.rootKey]: attrs};
|
||||
return {_attr: attrs};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user