lots of tslinting
This commit is contained in:
@ -5,7 +5,7 @@ export class Columns extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:cols");
|
||||
this.root.push(new Attributes({
|
||||
space: "708"
|
||||
space: "708",
|
||||
}));
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ export class DocumentGrid extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:docGrid");
|
||||
this.root.push(new Attributes({
|
||||
linePitch: "360"
|
||||
linePitch: "360",
|
||||
}));
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { Attributes, XmlComponent } from "../../xml-components";
|
||||
import {SectionProperties} from "./section-properties";
|
||||
import { SectionProperties } from "./section-properties";
|
||||
|
||||
export class Body extends XmlComponent {
|
||||
|
||||
@ -8,7 +8,7 @@ export class Body extends XmlComponent {
|
||||
// this.root.push(new SectionProperties()); not actually needed
|
||||
}
|
||||
|
||||
push(component: XmlComponent) {
|
||||
public push(component: XmlComponent): void {
|
||||
// this.root.splice(this.body.length - 1, 0, component);
|
||||
this.root.push(component);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ export class PageSize extends XmlComponent {
|
||||
super("w:pgSz");
|
||||
this.root.push(new Attributes({
|
||||
w: "11906",
|
||||
h: "16838"
|
||||
h: "16838",
|
||||
}));
|
||||
}
|
||||
}
|
@ -52,7 +52,7 @@ export class DocumentAttributes extends XmlAttributeComponent {
|
||||
dcterms: "xmlns:dcterms",
|
||||
dcmitype: "xmlns:dcmitype",
|
||||
xsi: "xmlns:xsi",
|
||||
type: "xsi:type"
|
||||
type: "xsi:type",
|
||||
}, properties);
|
||||
|
||||
this.root = properties;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export {Document} from "./document";
|
||||
export {Paragraph} from "./paragraph";
|
||||
export {Run} from "./run"
|
||||
export {TextRun} from "./run/text-run"
|
||||
export { Document } from "./document";
|
||||
export { Paragraph } from "./paragraph";
|
||||
export { Run } from "./run";
|
||||
export { TextRun } from "./run/text-run";
|
||||
|
@ -8,7 +8,7 @@ class Border extends XmlComponent {
|
||||
color: "auto",
|
||||
space: "1",
|
||||
val: "single",
|
||||
sz: "6"
|
||||
sz: "6",
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,19 @@
|
||||
import { Attributes, XmlComponent } from "../xml-components";
|
||||
import {ThematicBreak} from "./border";
|
||||
import {PageBreak} from "./page-break";
|
||||
import {TextRun} from "../run/text-run";
|
||||
import {ParagraphProperties} from "./properties";
|
||||
import {MaxRightTabStop, LeftTabStop} from "./tab-stop";
|
||||
import {Style} from "./style";
|
||||
import {NumberProperties} from "./unordered-list";
|
||||
import { Num } from "../../numbering/num";
|
||||
import { TextRun } from "../run/text-run";
|
||||
import { Attributes, XmlComponent } from "../xml-components";
|
||||
import { ThematicBreak } from "./border";
|
||||
import { PageBreak } from "./page-break";
|
||||
import { ParagraphProperties } from "./properties";
|
||||
import { Style } from "./style";
|
||||
import { LeftTabStop, MaxRightTabStop } from "./tab-stop";
|
||||
import { NumberProperties } from "./unordered-list";
|
||||
|
||||
class Alignment extends XmlComponent {
|
||||
|
||||
constructor(type: string) {
|
||||
super("w:jc");
|
||||
this.root.push(new Attributes({
|
||||
val: type
|
||||
val: type,
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -30,82 +30,82 @@ export class Paragraph extends XmlComponent {
|
||||
}
|
||||
}
|
||||
|
||||
addText(run: TextRun): Paragraph {
|
||||
public addText(run: TextRun): Paragraph {
|
||||
this.root.push(run);
|
||||
return this;
|
||||
}
|
||||
|
||||
heading1(): Paragraph {
|
||||
public heading1(): Paragraph {
|
||||
this.properties.push(new Style("Heading1"));
|
||||
return this;
|
||||
}
|
||||
|
||||
heading2(): Paragraph {
|
||||
public heading2(): Paragraph {
|
||||
this.properties.push(new Style("Heading2"));
|
||||
return this;
|
||||
}
|
||||
|
||||
heading3(): Paragraph {
|
||||
public heading3(): Paragraph {
|
||||
this.properties.push(new Style("Heading3"));
|
||||
return this;
|
||||
}
|
||||
|
||||
heading4(): Paragraph {
|
||||
public heading4(): Paragraph {
|
||||
this.properties.push(new Style("Heading4"));
|
||||
return this;
|
||||
}
|
||||
|
||||
heading5(): Paragraph {
|
||||
public heading5(): Paragraph {
|
||||
this.properties.push(new Style("Heading5"));
|
||||
return this;
|
||||
}
|
||||
|
||||
title(): Paragraph {
|
||||
public title(): Paragraph {
|
||||
this.properties.push(new Style("Title"));
|
||||
return this;
|
||||
}
|
||||
|
||||
center(): Paragraph {
|
||||
public center(): Paragraph {
|
||||
this.properties.push(new Alignment("center"));
|
||||
return this;
|
||||
}
|
||||
|
||||
left(): Paragraph {
|
||||
public left(): Paragraph {
|
||||
this.properties.push(new Alignment("left"));
|
||||
return this;
|
||||
}
|
||||
|
||||
right(): Paragraph {
|
||||
public right(): Paragraph {
|
||||
this.properties.push(new Alignment("right"));
|
||||
return this;
|
||||
}
|
||||
|
||||
justified(): Paragraph {
|
||||
public justified(): Paragraph {
|
||||
this.properties.push(new Alignment("both"));
|
||||
return this;
|
||||
}
|
||||
|
||||
thematicBreak(): Paragraph {
|
||||
public thematicBreak(): Paragraph {
|
||||
this.properties.push(new ThematicBreak());
|
||||
return this;
|
||||
}
|
||||
|
||||
pageBreak(): Paragraph {
|
||||
public pageBreak(): Paragraph {
|
||||
this.properties.push(new PageBreak());
|
||||
return this;
|
||||
}
|
||||
|
||||
maxRightTabStop(): Paragraph {
|
||||
public maxRightTabStop(): Paragraph {
|
||||
this.properties.push(new MaxRightTabStop());
|
||||
return this;
|
||||
}
|
||||
|
||||
leftTabStop(position: number): Paragraph {
|
||||
public leftTabStop(position: number): Paragraph {
|
||||
this.properties.push(new LeftTabStop(position));
|
||||
return this;
|
||||
}
|
||||
|
||||
bullet(): Paragraph {
|
||||
public bullet(): Paragraph {
|
||||
this.properties.push(new Style("ListParagraph"));
|
||||
this.properties.push(new NumberProperties(1, 0));
|
||||
return this;
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { Run } from "../run";
|
||||
import { Attributes, XmlComponent } from "../xml-components";
|
||||
import {Run} from "../run";
|
||||
|
||||
class Break extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
super("w:br");
|
||||
this.root.push(new Attributes({
|
||||
type: "page"
|
||||
type: "page",
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ export class ParagraphProperties extends XmlComponent {
|
||||
this.root.push(new Attributes());
|
||||
}
|
||||
|
||||
push(item: XmlComponent): void {
|
||||
public push(item: XmlComponent): void {
|
||||
this.root.push(item);
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ export class Style extends XmlComponent {
|
||||
constructor(type: string) {
|
||||
super("w:pStyle");
|
||||
this.root.push(new Attributes({
|
||||
val: type
|
||||
val: type,
|
||||
}));
|
||||
}
|
||||
}
|
@ -10,11 +10,11 @@ class TabStop extends XmlComponent {
|
||||
|
||||
class Tab extends XmlComponent {
|
||||
|
||||
constructor(value: string, position: any) {
|
||||
constructor(value: string, position: number) {
|
||||
super("w:tab");
|
||||
this.root.push(new Attributes({
|
||||
val: value,
|
||||
pos: position
|
||||
pos: position.toString(),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Attributes, XmlComponent } from "../xml-components";
|
||||
import {Style} from "./style";
|
||||
import { Style } from "./style";
|
||||
|
||||
export class NumberProperties extends XmlComponent {
|
||||
|
||||
@ -15,7 +15,7 @@ class IndentLevel extends XmlComponent {
|
||||
constructor(level: number) {
|
||||
super("w:ilvl");
|
||||
this.root.push(new Attributes({
|
||||
val: level
|
||||
val: level,
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,7 @@ class NumberId extends XmlComponent {
|
||||
constructor(id: number) {
|
||||
super("w:numId");
|
||||
this.root.push(new Attributes({
|
||||
val: id
|
||||
val: id,
|
||||
}));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user