fix numbering/num.ts linter warnings
This commit is contained in:
@ -1,24 +1,24 @@
|
|||||||
import {XmlComponent, Attributes, XmlAttributeComponent} from "../docx/xml-components";
|
import { Attributes, XmlAttributeComponent, XmlComponent } from "../docx/xml-components";
|
||||||
|
|
||||||
class AbstractNumId extends XmlComponent {
|
class AbstractNumId extends XmlComponent {
|
||||||
|
|
||||||
constructor(value: number) {
|
constructor(value: number) {
|
||||||
super("w:abstractNumId");
|
super("w:abstractNumId");
|
||||||
this.root.push(new Attributes({
|
this.root.push(new Attributes({
|
||||||
val: value
|
val: value,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface NumAttributesProperties {
|
interface INumAttributesProperties {
|
||||||
numId: number;
|
numId: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
class NumAttributes extends XmlAttributeComponent {
|
class NumAttributes extends XmlAttributeComponent {
|
||||||
|
|
||||||
constructor(properties: NumAttributesProperties) {
|
constructor(properties: INumAttributesProperties) {
|
||||||
super({
|
super({
|
||||||
numId: "w:numId"
|
numId: "w:numId",
|
||||||
}, properties);
|
}, properties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,8 +28,8 @@ export class Num extends XmlComponent {
|
|||||||
constructor(numId: number, abstractNumId: number) {
|
constructor(numId: number, abstractNumId: number) {
|
||||||
super("w:num");
|
super("w:num");
|
||||||
this.root.push(new NumAttributes({
|
this.root.push(new NumAttributes({
|
||||||
numId: numId
|
numId: numId,
|
||||||
}));
|
}));
|
||||||
this.root.push(new AbstractNumId(abstractNumId));
|
this.root.push(new AbstractNumId(abstractNumId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user