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