fix linter warnings in docx/run/index.ts
This commit is contained in:
@ -1,13 +1,14 @@
|
|||||||
import {XmlComponent, Attributes} from "../xml-components";
|
import { Break } from "./break";
|
||||||
|
import { Caps, SmallCaps } from "./caps";
|
||||||
|
import { Bold, Italics } from "./formatting";
|
||||||
|
import { RunProperties } from "./properties";
|
||||||
import { RunFonts } from "./run-fonts";
|
import { RunFonts } from "./run-fonts";
|
||||||
import {RunProperties} from "./properties";
|
import { SubScript, SuperScript } from "./script";
|
||||||
import {Bold, Italics} from "./formatting";
|
import { DoubleStrike, Strike } from "./strike";
|
||||||
import {Tab} from "./tab";
|
import { Tab } from "./tab";
|
||||||
import {Break} from "./break";
|
import { Underline } from "./underline";
|
||||||
import {SmallCaps, Caps} from "./caps";
|
|
||||||
import {Strike, DoubleStrike} from "./strike";
|
import { Attributes, XmlComponent } from "../xml-components";
|
||||||
import {SubScript, SuperScript} from "./script";
|
|
||||||
import {Underline} from "./underline"
|
|
||||||
|
|
||||||
export class Run extends XmlComponent {
|
export class Run extends XmlComponent {
|
||||||
private properties: RunProperties;
|
private properties: RunProperties;
|
||||||
@ -18,62 +19,62 @@ export class Run extends XmlComponent {
|
|||||||
this.root.push(this.properties);
|
this.root.push(this.properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
bold(): Run {
|
public bold(): Run {
|
||||||
this.properties.push(new Bold());
|
this.properties.push(new Bold());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
italic(): Run {
|
public italic(): Run {
|
||||||
this.properties.push(new Italics());
|
this.properties.push(new Italics());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
underline(): Run {
|
public underline(): Run {
|
||||||
this.properties.push(new Underline());
|
this.properties.push(new Underline());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
break(): Run {
|
public break(): Run {
|
||||||
this.root.splice(1, 0, new Break());
|
this.root.splice(1, 0, new Break());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
tab(): Run {
|
public tab(): Run {
|
||||||
this.root.splice(1, 0, new Tab());
|
this.root.splice(1, 0, new Tab());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
smallCaps(): Run {
|
public smallCaps(): Run {
|
||||||
this.properties.push(new SmallCaps());
|
this.properties.push(new SmallCaps());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
allCaps(): Run {
|
public allCaps(): Run {
|
||||||
this.properties.push(new Caps());
|
this.properties.push(new Caps());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
strike(): Run {
|
public strike(): Run {
|
||||||
this.properties.push(new Strike());
|
this.properties.push(new Strike());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
doubleStrike(): Run {
|
public doubleStrike(): Run {
|
||||||
this.properties.push(new DoubleStrike());
|
this.properties.push(new DoubleStrike());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
subScript(): Run {
|
public subScript(): Run {
|
||||||
this.properties.push(new SubScript());
|
this.properties.push(new SubScript());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
superScript(): Run {
|
public superScript(): Run {
|
||||||
this.properties.push(new SuperScript());
|
this.properties.push(new SuperScript());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
font(fontName: string): Run {
|
public font(fontName: string): Run {
|
||||||
this.properties.push(new RunFonts(fontName));
|
this.properties.push(new RunFonts(fontName));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user