Fix Prettier errors
This commit is contained in:
@ -2,21 +2,23 @@
|
|||||||
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
||||||
|
|
||||||
export interface TabStopDefinition {
|
export interface TabStopDefinition {
|
||||||
type: TabStopType,
|
type: TabStopType;
|
||||||
position: number | TabStopPosition,
|
position: number | TabStopPosition;
|
||||||
leader?: LeaderType
|
leader?: LeaderType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TabStop extends XmlComponent {
|
export class TabStop extends XmlComponent {
|
||||||
public constructor(tabDefs: (TabStopDefinition[] | TabStopDefinition | TabStopType), position?: number, leader?: LeaderType) {
|
public constructor(tabDefs: TabStopDefinition[] | TabStopDefinition | TabStopType, position?: number, leader?: LeaderType) {
|
||||||
super("w:tabs");
|
super("w:tabs");
|
||||||
if (typeof tabDefs === "string") {
|
if (typeof tabDefs === "string") {
|
||||||
this.root.push(new TabStopItem(tabDefs, position, leader));
|
this.root.push(new TabStopItem(tabDefs, position, leader));
|
||||||
} else {
|
} else {
|
||||||
if (Array.isArray(tabDefs)) {
|
if (Array.isArray(tabDefs)) {
|
||||||
tabDefs.forEach((function(tabDef) {
|
tabDefs.forEach(
|
||||||
|
function (tabDef) {
|
||||||
this.root.push(new TabStopItem(tabDef));
|
this.root.push(new TabStopItem(tabDef));
|
||||||
}).bind(this));
|
}.bind(this),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
this.root.push(new TabStopItem(tabDefs));
|
this.root.push(new TabStopItem(tabDefs));
|
||||||
}
|
}
|
||||||
@ -57,7 +59,7 @@ export class TabAttributes extends XmlAttributeComponent<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class TabStopItem extends XmlComponent {
|
export class TabStopItem extends XmlComponent {
|
||||||
public constructor(tabDef: (TabStopDefinition | TabStopType), position?: number, leader?: LeaderType) {
|
public constructor(tabDef: TabStopDefinition | TabStopType, position?: number, leader?: LeaderType) {
|
||||||
super("w:tab");
|
super("w:tab");
|
||||||
if (typeof tabDef === "string") {
|
if (typeof tabDef === "string") {
|
||||||
if (typeof position === "number")
|
if (typeof position === "number")
|
||||||
@ -75,7 +77,7 @@ export class TabStopItem extends XmlComponent {
|
|||||||
val: tabDef.type,
|
val: tabDef.type,
|
||||||
pos: tabDef.position,
|
pos: tabDef.position,
|
||||||
leader: tabDef.leader,
|
leader: tabDef.leader,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user