diff --git a/ts/docx/border.ts b/ts/docx/border.ts index deedd98fba..9a0a84882e 100644 --- a/ts/docx/border.ts +++ b/ts/docx/border.ts @@ -1,10 +1,10 @@ -import {P, Attributes} from "./xml-components"; +import {XmlComponent, Attributes} from "./xml-components"; -class Border implements P { - private bottom: Array

; +class Border implements XmlComponent { + private bottom: Array; constructor() { - this.bottom = new Array

(); + this.bottom = new Array(); this.bottom.push(new Attributes({ color: "auto", space: "1", @@ -15,10 +15,10 @@ class Border implements P { } export class ThematicBreak { - private pBdr: Array

; + private pBdr: Array; constructor() { - this.pBdr = new Array

(); + this.pBdr = new Array(); this.pBdr.push(new Border()); } } \ No newline at end of file diff --git a/ts/docx/paragraph.ts b/ts/docx/paragraph.ts index 56997fc125..1558525e23 100644 --- a/ts/docx/paragraph.ts +++ b/ts/docx/paragraph.ts @@ -1,11 +1,11 @@ -import {P, Attributes, ParagraphProperties, Run} from "./xml-components"; +import {XmlComponent, Attributes, ParagraphProperties, Run} from "./xml-components"; import {ThematicBreak} from "./border"; class Style { - private pStyle: Array

; + private pStyle: Array; constructor(type: string) { - this.pStyle = new Array

(); + this.pStyle = new Array(); this.pStyle.push(new Attributes({ val: type })); @@ -13,10 +13,10 @@ class Style { } class Alignment { - private jc: Array

; + private jc: Array; constructor(type: string) { - this.jc = new Array

(); + this.jc = new Array(); this.jc.push(new Attributes({ val: type })); @@ -24,11 +24,11 @@ class Alignment { } export class Paragraph { - private p: Array

; + private p: Array; private properties: ParagraphProperties; constructor(text?: string) { - this.p = new Array

(); + this.p = new Array(); this.p.push(new Attributes()); this.properties = new ParagraphProperties(); this.p.push(this.properties); diff --git a/ts/docx/xml-components/index.ts b/ts/docx/xml-components/index.ts index cb4363f5f5..f6816ccf75 100644 --- a/ts/docx/xml-components/index.ts +++ b/ts/docx/xml-components/index.ts @@ -1,4 +1,4 @@ -export interface P { +export interface XmlComponent { } @@ -9,42 +9,42 @@ interface AttributesProperties { sz?: string; } -export class Attributes implements P { +export class Attributes implements XmlComponent { private _attrs: Object; constructor(properties?: AttributesProperties) { this._attrs = properties - + if (!properties) { this._attrs = {}; } } } -export class ParagraphProperties implements P { - private pPr: Array

; +export class ParagraphProperties implements XmlComponent { + private pPr: Array; constructor() { - this.pPr = new Array

(); + this.pPr = new Array(); this.pPr.push(new Attributes()); } - push(item: P) { + push(item: XmlComponent) { this.pPr.push(item); } } -export class Run implements P { - private r: Array

; +export class Run implements XmlComponent { + private r: Array; constructor(text: string) { - this.r = new Array

(); + this.r = new Array(); this.r.push(new ParagraphProperties()); this.r.push(new Text(text)); } } -export class Text implements P { +export class Text implements XmlComponent { private t: string; constructor(text: string) {