From 958b5ea307aaaab57e63e427e201bfe74257ac55 Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 08:58:29 +0100 Subject: [PATCH] improved type annotation for Attributes#prepForXml --- ts/docx/xml-components/default-attributes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/docx/xml-components/default-attributes.ts b/ts/docx/xml-components/default-attributes.ts index e1c4d0e461..7559f9fead 100644 --- a/ts/docx/xml-components/default-attributes.ts +++ b/ts/docx/xml-components/default-attributes.ts @@ -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}; } }