From c521d0ce6387bd8f3d2ca5f3201fbfc637ed329a Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 08:23:27 +0100 Subject: [PATCH 1/7] rename toXml -> prepForXml --- ts/docx/xml-components/base.ts | 2 +- ts/docx/xml-components/default-attributes.ts | 6 ++---- ts/docx/xml-components/index.ts | 9 ++++----- ts/export/formatter.ts | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ts/docx/xml-components/base.ts b/ts/docx/xml-components/base.ts index cc20f27cb2..9c94517c56 100644 --- a/ts/docx/xml-components/base.ts +++ b/ts/docx/xml-components/base.ts @@ -5,5 +5,5 @@ export abstract class BaseXmlComponent { this.rootKey = rootKey; } - public abstract toXml(): object; + public abstract prepForXml(): object; } diff --git a/ts/docx/xml-components/default-attributes.ts b/ts/docx/xml-components/default-attributes.ts index 231a632e3d..e1c4d0e461 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 toXml(): object { + public prepForXml(): object { const attrs = {}; if (this.root !== undefined) { _.forOwn(this.root, (value, key) => { @@ -26,8 +26,6 @@ export abstract class XmlAttributeComponent extends BaseXmlComponent { } }); } - const ret = {}; - ret[this.rootKey] = attrs; - return ret; + return {[this.rootKey]: attrs}; } } diff --git a/ts/docx/xml-components/index.ts b/ts/docx/xml-components/index.ts index ad02890532..9db9c5a473 100644 --- a/ts/docx/xml-components/index.ts +++ b/ts/docx/xml-components/index.ts @@ -10,16 +10,15 @@ export abstract class XmlComponent extends BaseXmlComponent { this.root = new Array(); } - public toXml(): object { - // What does 'ret' stand for? Retain? Return? - const ret = this.root.map((comp) => { + public prepForXml(): object { + const children = this.root.map((comp) => { if (comp instanceof BaseXmlComponent) { - return comp.toXml(); + return comp.prepForXml(); } return comp; }).filter((comp) => comp); // Exclude null, undefined, and empty strings return { - [this.rootKey]: ret, + [this.rootKey]: children, }; } } diff --git a/ts/export/formatter.ts b/ts/export/formatter.ts index 9020e0b293..76c05748bb 100644 --- a/ts/export/formatter.ts +++ b/ts/export/formatter.ts @@ -2,6 +2,6 @@ import { BaseXmlComponent } from "../docx/xml-components"; export class Formatter { public format(input: BaseXmlComponent): any { - return input.toXml(); + return input.prepForXml(); } } From 2fc9156e93f14137a46393232bc01d15a442d0b2 Mon Sep 17 00:00:00 2001 From: felipe Date: Wed, 8 Mar 2017 17:17:48 +0100 Subject: [PATCH 2/7] remove console.log statements --- ts/export/packer/packer.ts | 11 ----------- ts/styles/factory.ts | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/ts/export/packer/packer.ts b/ts/export/packer/packer.ts index e1104ec3da..b7838c5ba3 100644 --- a/ts/export/packer/packer.ts +++ b/ts/export/packer/packer.ts @@ -49,7 +49,6 @@ export abstract class Packer { public pack(output: any): void { this.archive.pipe(output); - console.log(appRoot.path + "/template"); this.archive.glob("**", { expand: true, cwd: appRoot.path + "/template", @@ -60,20 +59,10 @@ export abstract class Packer { cwd: appRoot.path + "/template", }); - // this.archive.file(appRoot.path + "/template/[Content_Types].xml", { name: "[Content_Types].xml" }); - // console.log(__dirname + "/packer.js"); - // this.archive.file(__dirname + "/packer.js", { name: "/[Content_Types].xml" }); - - /*this.archive.directory(appRoot.path + "/template", { - name: "/root/g.txt", - prefix: "root" - });*/ const xmlDocument = xml(this.formatter.format(this.document)); const xmlStyles = xml(this.formatter.format(this.style)); const xmlProperties = xml(this.formatter.format(this.properties), { declaration: { standalone: "yes", encoding: "UTF-8" } }); const xmlNumbering = xml(this.formatter.format(this.numbering)); - // console.log(JSON.stringify(this.numbering, null, " ")); - console.log(xmlNumbering); this.archive.append(xmlDocument, { name: "word/document.xml", }); diff --git a/ts/styles/factory.ts b/ts/styles/factory.ts index d44e4c3b09..274c8df834 100644 --- a/ts/styles/factory.ts +++ b/ts/styles/factory.ts @@ -54,7 +54,6 @@ export class DefaultStylesFactory { // listParagraph.addParagraphProperty(); styles.push(listParagraph); - // console.log(JSON.stringify(styles, null, " ")); return styles; } -} +} \ No newline at end of file From 10684b34aa96dabf2f8f8720ed732788a4cde027 Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 08:52:47 +0100 Subject: [PATCH 3/7] clean up unused imports and a linter warning --- ts/docx/xml-components/index.ts | 1 - ts/numbering/abstract-numbering.ts | 1 - ts/numbering/index.ts | 1 - ts/styles/factory.ts | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ts/docx/xml-components/index.ts b/ts/docx/xml-components/index.ts index 9db9c5a473..182861bd9e 100644 --- a/ts/docx/xml-components/index.ts +++ b/ts/docx/xml-components/index.ts @@ -1,4 +1,3 @@ -import * as _ from "lodash"; import { BaseXmlComponent } from "./base"; export { BaseXmlComponent }; diff --git a/ts/numbering/abstract-numbering.ts b/ts/numbering/abstract-numbering.ts index f8c3822658..5aaaf7a20d 100644 --- a/ts/numbering/abstract-numbering.ts +++ b/ts/numbering/abstract-numbering.ts @@ -1,4 +1,3 @@ -import * as _ from "lodash"; import { XmlAttributeComponent, XmlComponent } from "../docx/xml-components"; import { Level } from "./level"; import { MultiLevelType } from "./multi-level-type"; diff --git a/ts/numbering/index.ts b/ts/numbering/index.ts index 06b32b1ab2..986ad64115 100644 --- a/ts/numbering/index.ts +++ b/ts/numbering/index.ts @@ -1,4 +1,3 @@ -import * as _ from "lodash"; import { DocumentAttributes } from "../docx/document/document-attributes"; import { Indent } from "../docx/paragraph/indent"; import { RunFonts } from "../docx/run/run-fonts"; diff --git a/ts/styles/factory.ts b/ts/styles/factory.ts index 274c8df834..e85f66a438 100644 --- a/ts/styles/factory.ts +++ b/ts/styles/factory.ts @@ -56,4 +56,4 @@ export class DefaultStylesFactory { return styles; } -} \ No newline at end of file +} From 3a6cf81c60cf7b5baa81111866c7452e70f002ba Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 08:54:55 +0100 Subject: [PATCH 4/7] use strict null checks for added type safety From the TypeScript manual "In strict null checking mode, the null and undefined values are not in the domain of every type and are only assignable to themselves and any (the one exception being that undefined is also assignable to void)." In other words, this setting means the compiler will complain if you try to use a variable, but it might be null or undefined. Since the project builds and tests pass with it, I think it's good to turn it on. If it becomes annoying, you can always turn it off later --- ts/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/tsconfig.json b/ts/tsconfig.json index 4197377e50..7ae95adc9e 100644 --- a/ts/tsconfig.json +++ b/ts/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "target": "es6", + "strictNullChecks": true, "sourceMap": true, "removeComments": true, "preserveConstEnums": true, @@ -12,4 +13,4 @@ "exclude": [ "tests" ] -} \ No newline at end of file +} From 958b5ea307aaaab57e63e427e201bfe74257ac55 Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 08:58:29 +0100 Subject: [PATCH 5/7] 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}; } } From 7ff838357a8fbe6d6e45a9e88e33ab2bd3f28d2d Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 10:32:40 +0100 Subject: [PATCH 6/7] removed empty Attributes from ParagraphProperties I checked the spec, and "w:pPr" does not take any attributes. I also converted the paragraph tests to use the deep.equal style to get rid of some more jsonify! --- ts/docx/paragraph/properties.ts | 1 - ts/tests/docx/paragraph/paragraphTests.ts | 123 ++++++++++++++++------ ts/tests/stylesTest.ts | 30 +++--- 3 files changed, 103 insertions(+), 51 deletions(-) diff --git a/ts/docx/paragraph/properties.ts b/ts/docx/paragraph/properties.ts index 72e6c3059d..a5f3aa3367 100644 --- a/ts/docx/paragraph/properties.ts +++ b/ts/docx/paragraph/properties.ts @@ -4,7 +4,6 @@ export class ParagraphProperties extends XmlComponent { constructor() { super("w:pPr"); - this.root.push(new Attributes()); } public push(item: XmlComponent): void { diff --git a/ts/tests/docx/paragraph/paragraphTests.ts b/ts/tests/docx/paragraph/paragraphTests.ts index 6116a206c6..4866246361 100644 --- a/ts/tests/docx/paragraph/paragraphTests.ts +++ b/ts/tests/docx/paragraph/paragraphTests.ts @@ -35,80 +35,135 @@ describe("Paragraph", () => { describe("#heading1()", () => { it("should add heading style to JSON", () => { paragraph.heading1(); - const newJson = Utility.jsonify(paragraph); - assert.equal(newJson.root[0].root[1].root[0].root.val, "Heading1"); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [ + { + "w:pPr": [{"w:pStyle": [{_attr: {"w:val": "Heading1"}}]}], + }, + ], + }); }); }); describe("#heading2()", () => { it("should add heading style to JSON", () => { paragraph.heading2(); - const newJson = Utility.jsonify(paragraph); - - assert.equal(newJson.root[0].root[1].root[0].root.val, "Heading2"); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [ + { + "w:pPr": [{"w:pStyle": [{_attr: {"w:val": "Heading2"}}]}], + }, + ], + }); }); }); describe("#heading3()", () => { it("should add heading style to JSON", () => { paragraph.heading3(); - const newJson = Utility.jsonify(paragraph); - - assert.equal(newJson.root[0].root[1].root[0].root.val, "Heading3"); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [ + { + "w:pPr": [{"w:pStyle": [{_attr: {"w:val": "Heading3"}}]}], + }, + ], + }); }); }); describe("#title()", () => { it("should add title style to JSON", () => { paragraph.title(); - const newJson = Utility.jsonify(paragraph); - - assert.equal(newJson.root[0].root[1].root[0].root.val, "Title"); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [ + { + "w:pPr": [{"w:pStyle": [{_attr: {"w:val": "Title"}}]}], + }, + ], + }); }); }); describe("#center()", () => { it("should add center alignment to JSON", () => { paragraph.center(); - const newJson = Utility.jsonify(paragraph); - - assert.equal(newJson.root[0].root[1].root[0].root.val, "center"); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [ + { + "w:pPr": [{"w:jc": [{_attr: {"w:val": "center"}}]}], + }, + ], + }); }); }); describe("#thematicBreak()", () => { it("should add thematic break to JSON", () => { paragraph.thematicBreak(); - const newJson = Utility.jsonify(paragraph); - assert.equal(newJson.root[0].root[1].rootKey, "w:pBdr"); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [{ + "w:pPr": [{ + "w:pBdr": [{ + "w:bottom": [{ + _attr: { + "w:val": "single", + "w:color": "auto", + "w:space": "1", + "w:sz": "6", + }, + }], + }], + }], + }], + }); }); }); describe("#pageBreak()", () => { it("should add page break to JSON", () => { paragraph.pageBreak(); - const newJson = Utility.jsonify(paragraph); - assert.equal(newJson.root[0].root[1].root[1].rootKey, "w:br"); - }); - - it("should add page break with 'page' type", () => { - paragraph.pageBreak(); - const newJson = Utility.jsonify(paragraph); - assert.equal(newJson.root[0].root[1].root[1].root[0].root.type, "page"); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [{ + "w:pPr": [{ + "w:r": [ + {"w:rPr": []}, + {"w:br": [{_attr: {"w:type": "page"}}]}, + ], + }], + }], + }); }); }); describe("#bullet()", () => { it("should add list paragraph style to JSON", () => { paragraph.bullet(); - const newJson = Utility.jsonify(paragraph); - assert.equal(newJson.root[0].root[1].root[0].root.val, "ListParagraph"); + const tree = new Formatter().format(paragraph); + expect(tree).to.have.property("w:p").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]).to.have.property("w:pPr").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]["w:pPr"][0]).to.deep.equal({ + "w:pStyle": [{_attr: {"w:val": "ListParagraph"}}], + }); }); it("it should add numbered properties", () => { paragraph.bullet(); - const newJson = Utility.jsonify(paragraph); - assert.isDefined(newJson.root[0].root[2]); + const tree = new Formatter().format(paragraph); + expect(tree).to.have.property("w:p").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]).to.have.property("w:pPr").which.is.an("array").which.has.length.at.least(2); + expect(tree["w:p"][0]["w:pPr"][1]).to.deep.equal({ + "w:numPr": [ + {"w:ilvl": [{_attr: {"w:val": 0}}]}, + {"w:numId": [{_attr: {"w:val": 1}}]}, + ], + }); }); }); @@ -120,8 +175,12 @@ describe("Paragraph", () => { const letterNumbering = numbering.createConcreteNumbering(numberedAbstract); paragraph.setNumbering(letterNumbering, 0); - const newJson = Utility.jsonify(paragraph); - assert.equal(newJson.root[0].root[1].root[0].root.val, "ListParagraph"); + const tree = new Formatter().format(paragraph); + expect(tree).to.have.property("w:p").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]).to.have.property("w:pPr").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]["w:pPr"][0]).to.deep.equal({ + "w:pStyle": [{_attr: {"w:val": "ListParagraph"}}], + }); }); it("it should add numbered properties", () => { @@ -136,7 +195,6 @@ describe("Paragraph", () => { "w:p": [ { "w:pPr": [ - {_attr: {}}, {"w:pStyle": [{_attr: {"w:val": "ListParagraph"}}]}, { "w:numPr": [ @@ -159,7 +217,6 @@ describe("Paragraph", () => { "w:p": [ { "w:pPr": [ - {_attr: {}}, {"w:pStyle": [{_attr: {"w:val": "myFancyStyle"}}]}, ], }, @@ -176,7 +233,6 @@ describe("Paragraph", () => { "w:p": [ { "w:pPr": [ - {_attr: {}}, {"w:ind": [{_attr: {"w:left": 720}}]}, ], }, @@ -193,7 +249,6 @@ describe("Paragraph", () => { "w:p": [ { "w:pPr": [ - {_attr: {}}, {"w:spacing": [{_attr: {"w:before": 90, "w:line": 50}}]}, ], }, diff --git a/ts/tests/stylesTest.ts b/ts/tests/stylesTest.ts index 0922627528..93ec99bfe8 100644 --- a/ts/tests/stylesTest.ts +++ b/ts/tests/stylesTest.ts @@ -25,7 +25,7 @@ describe("Styles", () => { expect(tree).to.deep.equal([{ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "pStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": []}, ], }]); @@ -38,7 +38,7 @@ describe("Styles", () => { "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "pStyleId"}}, {"w:name": [{_attr: {"w:val": "Paragraph Style"}}]}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": []}, ], }]); @@ -118,7 +118,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": []}, ], }); @@ -131,7 +131,7 @@ describe("ParagraphStyle", () => { "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, {"w:name": [{_attr: {"w:val": "Style Name"}}]}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": []}, ], }); @@ -146,7 +146,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": []}, {"w:basedOn": [{_attr: {"w:val": "otherId"}}]}, ], @@ -160,7 +160,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": []}, {"w:qFormat": []}, ], @@ -174,7 +174,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": []}, {"w:next": [{_attr: {"w:val": "otherId"}}]}, ], @@ -191,7 +191,6 @@ describe("ParagraphStyle", () => { "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, {"w:pPr": [ - {_attr: {}}, {"w:ind": [{_attr: {"w:left": 720}}]}, ]}, {"w:rPr": []}, @@ -207,7 +206,6 @@ describe("ParagraphStyle", () => { "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, {"w:pPr": [ - {_attr: {}}, {"w:spacing": [{_attr: {"w:before": 50, "w:after": 150}}]}, ]}, {"w:rPr": []}, @@ -224,7 +222,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": [ {"w:sz": [{_attr: {"w:val": 24}}]}, ]}, @@ -239,7 +237,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": [ {"w:b": [{_attr: {"w:val": true}}]}, ]}, @@ -254,7 +252,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": [ {"w:i": [{_attr: {"w:val": true}}]}, ]}, @@ -270,7 +268,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": [ {"w:u": [{_attr: {"w:val": "single"}}]}, ]}, @@ -285,7 +283,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": [ {"w:u": [{_attr: {"w:val": "double"}}]}, ]}, @@ -300,7 +298,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": [ {"w:u": [{_attr: {"w:val": "double", "w:color": "005599"}}]}, ]}, @@ -316,7 +314,7 @@ describe("ParagraphStyle", () => { expect(tree).to.deep.equal({ "w:style": [ {_attr: {"w:type": "paragraph", "w:styleId": "myStyleId"}}, - {"w:pPr": [{_attr: {}}]}, + {"w:pPr": []}, {"w:rPr": [ {"w:color": [{_attr: {"w:val": "123456"}}]}, ]}, From fd1aab48f7a4c1cde1e72ac816a639bb633f7ef0 Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 10:35:38 +0100 Subject: [PATCH 7/7] removed some dead code causing tslint problems --- ts/styles/style/components.ts | 4 ---- ts/styles/style/index.ts | 4 ---- 2 files changed, 8 deletions(-) diff --git a/ts/styles/style/components.ts b/ts/styles/style/components.ts index becf418881..080ce00162 100644 --- a/ts/styles/style/components.ts +++ b/ts/styles/style/components.ts @@ -5,10 +5,6 @@ interface IComponentAttributes { } class ComponentAttributes extends XmlAttributeComponent { - /* tslint:disable */ - private _attr: IComponentAttributes; - /* tslint:enable */ - constructor(properties: IComponentAttributes) { super({val: "w:val"}, properties); } diff --git a/ts/styles/style/index.ts b/ts/styles/style/index.ts index 708603297a..9a486abbdc 100644 --- a/ts/styles/style/index.ts +++ b/ts/styles/style/index.ts @@ -15,10 +15,6 @@ export interface IStyleAttributes { } class StyleAttributes extends XmlAttributeComponent { - /* tslint:disable */ - private _attr: IStyleAttributes; - /* tslint:enable */ - constructor(properties: IStyleAttributes) { super({ type: "w:type",