fix abstract-number linter warnings
This commit is contained in:
@ -1,20 +1,19 @@
|
||||
import {XmlComponent} from "../docx/xml-components";
|
||||
import {XmlAttributeComponent} from "../docx/xml-components";
|
||||
import * as _ from "lodash";
|
||||
import { XmlAttributeComponent, XmlComponent } from "../docx/xml-components";
|
||||
import { Level } from "./level";
|
||||
import { MultiLevelType } from "./multi-level-type";
|
||||
import * as _ from "lodash";
|
||||
|
||||
interface AbstractNumberingAttributesProperties {
|
||||
interface IAbstractNumberingAttributesProperties {
|
||||
abstractNumId?: number;
|
||||
restartNumberingAfterBreak?: number;
|
||||
}
|
||||
|
||||
class AbstractNumberingAttributes extends XmlAttributeComponent {
|
||||
|
||||
constructor(properties: AbstractNumberingAttributesProperties) {
|
||||
constructor(properties: IAbstractNumberingAttributesProperties) {
|
||||
super({
|
||||
abstractNumId: "w:abstractNumId",
|
||||
restartNumberingAfterBreak: "w15:restartNumberingAfterBreak"
|
||||
restartNumberingAfterBreak: "w15:restartNumberingAfterBreak",
|
||||
}, properties);
|
||||
}
|
||||
}
|
||||
@ -25,17 +24,17 @@ export class AbstractNumbering extends XmlComponent {
|
||||
super("w:abstractNum");
|
||||
this.root.push(new AbstractNumberingAttributes({
|
||||
abstractNumId: id,
|
||||
restartNumberingAfterBreak: 0
|
||||
restartNumberingAfterBreak: 0,
|
||||
}));
|
||||
this.root.push(new MultiLevelType("hybridMultilevel"));
|
||||
}
|
||||
|
||||
addLevel(level: Level): void {
|
||||
public addLevel(level: Level): void {
|
||||
this.root.push(level);
|
||||
}
|
||||
|
||||
clearVariables() {
|
||||
_.forEach(this.root, element => {
|
||||
public clearVariables(): void {
|
||||
_.forEach(this.root, (element) => {
|
||||
element.clearVariables();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user