diff --git a/ts/docx/document/body/index.ts b/ts/docx/document/body/index.ts index edf9812f49..993d353573 100644 --- a/ts/docx/document/body/index.ts +++ b/ts/docx/document/body/index.ts @@ -1,15 +1,12 @@ -import { Attributes, XmlComponent } from "../../xml-components"; -import { SectionProperties } from "./section-properties"; +import { XmlComponent } from "../../xml-components"; export class Body extends XmlComponent { constructor() { super("w:body"); - // this.root.push(new SectionProperties()); not actually needed } public push(component: XmlComponent): void { - // this.root.splice(this.body.length - 1, 0, component); this.root.push(component); } } diff --git a/ts/docx/paragraph/properties.ts b/ts/docx/paragraph/properties.ts index a5f3aa3367..0dc0d8eb66 100644 --- a/ts/docx/paragraph/properties.ts +++ b/ts/docx/paragraph/properties.ts @@ -1,4 +1,4 @@ -import { Attributes, XmlComponent } from "../xml-components"; +import { XmlComponent } from "../xml-components"; export class ParagraphProperties extends XmlComponent { diff --git a/ts/docx/paragraph/unordered-list.ts b/ts/docx/paragraph/unordered-list.ts index faff9fd9a8..a30c49a7e9 100644 --- a/ts/docx/paragraph/unordered-list.ts +++ b/ts/docx/paragraph/unordered-list.ts @@ -1,5 +1,4 @@ import { Attributes, XmlComponent } from "../xml-components"; -import { Style } from "./style"; export class NumberProperties extends XmlComponent { diff --git a/ts/docx/run/index.ts b/ts/docx/run/index.ts index 5619adf1fc..6585de6c01 100644 --- a/ts/docx/run/index.ts +++ b/ts/docx/run/index.ts @@ -8,7 +8,7 @@ import { DoubleStrike, Strike } from "./strike"; import { Tab } from "./tab"; import { Underline } from "./underline"; -import { Attributes, XmlComponent } from "../xml-components"; +import { XmlComponent } from "../xml-components"; export class Run extends XmlComponent { private properties: RunProperties; diff --git a/ts/export/packer/express.ts b/ts/export/packer/express.ts index 088d5f3a11..539fac40d4 100644 --- a/ts/export/packer/express.ts +++ b/ts/export/packer/express.ts @@ -1,5 +1,4 @@ import * as express from "express"; -import * as fs from "fs"; import { Document } from "../../docx/document"; import { Numbering } from "../../numbering"; import { Properties } from "../../properties"; diff --git a/ts/export/packer/packer.ts b/ts/export/packer/packer.ts index a09f494ded..3da1291911 100644 --- a/ts/export/packer/packer.ts +++ b/ts/export/packer/packer.ts @@ -1,6 +1,5 @@ import * as appRoot from "app-root-path"; import * as archiver from "archiver"; -import * as fs from "fs"; import * as xml from "xml"; import { Document } from "../../docx"; import { Numbering } from "../../numbering"; diff --git a/ts/index.ts b/ts/index.ts index 230983a268..0227b712a7 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -2,4 +2,4 @@ export * from "./docx"; export * from "./export"; export { Numbering } from "./numbering"; export { Styles } from "./styles"; -export * from './export'; +export * from "./export"; diff --git a/ts/numbering/index.ts b/ts/numbering/index.ts index 986ad64115..a0e0f53652 100644 --- a/ts/numbering/index.ts +++ b/ts/numbering/index.ts @@ -3,7 +3,6 @@ import { Indent } from "../docx/paragraph/indent"; import { RunFonts } from "../docx/run/run-fonts"; import { XmlComponent } from "../docx/xml-components"; import { AbstractNumbering } from "./abstract-numbering"; -import { Level } from "./level"; import { Num } from "./num"; export class Numbering extends XmlComponent { diff --git a/ts/styles/factory.ts b/ts/styles/factory.ts index e85f66a438..5cfa36a441 100644 --- a/ts/styles/factory.ts +++ b/ts/styles/factory.ts @@ -1,16 +1,11 @@ -import { ParagraphProperties } from "../docx/paragraph/properties"; import { Color, Italics, Size } from "../docx/run/formatting"; -import { RunProperties } from "../docx/run/properties"; import { Styles } from "./"; import { DocumentDefaults } from "./defaults"; -import { ParagraphPropertiesDefaults } from "./defaults/paragraph-properties"; -import { RunPropertiesDefaults } from "./defaults/run-properties"; import { Heading1Style, Heading2Style, Heading3Style, Heading4Style, Heading5Style, Heading6Style, ListParagraph, TitleStyle, } from "./style"; -// import { StyleAttributes } from "./style/attributes"; export class DefaultStylesFactory { diff --git a/ts/styles/index.ts b/ts/styles/index.ts index da19782366..e24f32d986 100644 --- a/ts/styles/index.ts +++ b/ts/styles/index.ts @@ -1,8 +1,5 @@ import { DocumentAttributes } from "../docx/document/document-attributes"; import { XmlComponent } from "../docx/xml-components"; -import { DocumentDefaults } from "./defaults"; -import { LatentStyles } from "./latent-styles"; -import { LatentStyleException } from "./latent-styles/exceptions"; import { ParagraphStyle } from "./style"; export class Styles extends XmlComponent { diff --git a/ts/tests/_testTemplate.ts b/ts/tests/_testTemplate.ts index c9b4421481..54ba0b0ee8 100644 --- a/ts/tests/_testTemplate.ts +++ b/ts/tests/_testTemplate.ts @@ -1,5 +1,7 @@ +/* tslint:disable */ import { assert } from "chai"; import { Utility } from "./utility"; +/* tslint:enable */ describe("", () => { diff --git a/ts/tests/docx/paragraph/paragraphTests.ts b/ts/tests/docx/paragraph/paragraphTests.ts index 3f8ae4bb56..0482116bad 100644 --- a/ts/tests/docx/paragraph/paragraphTests.ts +++ b/ts/tests/docx/paragraph/paragraphTests.ts @@ -2,7 +2,6 @@ import { assert, expect } from "chai"; import * as docx from "../../../docx"; import { Formatter } from "../../../export/formatter"; import { Numbering } from "../../../numbering"; -import { Utility } from "../../utility"; describe("Paragraph", () => { let paragraph: docx.Paragraph; diff --git a/ts/tests/docx/run/runTest.ts b/ts/tests/docx/run/runTest.ts index 9691a0af34..1bdc1718f0 100644 --- a/ts/tests/docx/run/runTest.ts +++ b/ts/tests/docx/run/runTest.ts @@ -1,6 +1,5 @@ import { assert, expect } from "chai"; import { Run } from "../../../docx/run"; -import { TextRun } from "../../../docx/run/text-run"; import { Formatter } from "../../../export/formatter"; import { Utility } from "../../utility"; diff --git a/ts/tests/docx/run/underlineTests.ts b/ts/tests/docx/run/underlineTests.ts index 635516e1f0..079baf3337 100644 --- a/ts/tests/docx/run/underlineTests.ts +++ b/ts/tests/docx/run/underlineTests.ts @@ -1,5 +1,4 @@ import { assert, expect } from "chai"; -import { TextRun } from "../../../docx/run/text-run"; import * as u from "../../../docx/run/underline"; import { Formatter } from "../../../export/formatter"; import { Utility } from "../../utility"; diff --git a/ts/tests/export/localPackerTest.ts b/ts/tests/export/localPackerTest.ts index fd422a64db..cfdda4ce02 100644 --- a/ts/tests/export/localPackerTest.ts +++ b/ts/tests/export/localPackerTest.ts @@ -6,7 +6,6 @@ import { Paragraph } from "../../docx/paragraph"; import { LocalPacker } from "../../export/packer/local"; import { Properties } from "../../properties"; import { DefaultStylesFactory } from "../../styles/factory"; -import { DefaultStyle } from "../../styles/sample"; describe("Packer", () => { let packer: LocalPacker; diff --git a/ts/tests/stylesTest.ts b/ts/tests/stylesTest.ts index 93ec99bfe8..424197aacb 100644 --- a/ts/tests/stylesTest.ts +++ b/ts/tests/stylesTest.ts @@ -20,7 +20,6 @@ describe("Styles", () => { describe("#createParagraphStyle", () => { it("should create a new paragraph style and push it onto this collection", () => { - const ps = styles.createParagraphStyle("pStyleId"); const tree = new Formatter().format(styles)["w:styles"].filter((x) => !x._attr); expect(tree).to.deep.equal([{ "w:style": [ @@ -32,7 +31,6 @@ describe("Styles", () => { }); it("should set the paragraph name if given", () => { - const ps = styles.createParagraphStyle("pStyleId", "Paragraph Style"); const tree = new Formatter().format(styles)["w:styles"].filter((x) => !x._attr); expect(tree).to.deep.equal([{ "w:style": [