Initial ESlint conversion
This commit is contained in:
@ -10,7 +10,7 @@ export class Bookmark {
|
||||
public readonly children: ParagraphChild[];
|
||||
public readonly end: BookmarkEnd;
|
||||
|
||||
constructor(options: { readonly id: string; readonly children: ParagraphChild[] }) {
|
||||
public constructor(options: { readonly id: string; readonly children: ParagraphChild[] }) {
|
||||
const linkId = uniqueNumericId();
|
||||
|
||||
this.start = new BookmarkStart(options.id, linkId);
|
||||
@ -52,7 +52,7 @@ export class Bookmark {
|
||||
// </xsd:complexType>
|
||||
|
||||
export class BookmarkStart extends XmlComponent {
|
||||
constructor(id: string, linkId: number) {
|
||||
public constructor(id: string, linkId: number) {
|
||||
super("w:bookmarkStart");
|
||||
|
||||
const attributes = new BookmarkStartAttributes({
|
||||
@ -64,7 +64,7 @@ export class BookmarkStart extends XmlComponent {
|
||||
}
|
||||
|
||||
export class BookmarkEnd extends XmlComponent {
|
||||
constructor(linkId: number) {
|
||||
public constructor(linkId: number) {
|
||||
super("w:bookmarkEnd");
|
||||
|
||||
const attributes = new BookmarkEndAttributes({
|
||||
|
@ -13,7 +13,7 @@ export enum HyperlinkType {
|
||||
export class ConcreteHyperlink extends XmlComponent {
|
||||
public readonly linkId: string;
|
||||
|
||||
constructor(children: ParagraphChild[], relationshipId: string, anchor?: string) {
|
||||
public constructor(children: ParagraphChild[], relationshipId: string, anchor?: string) {
|
||||
super("w:hyperlink");
|
||||
|
||||
this.linkId = relationshipId;
|
||||
@ -33,13 +33,13 @@ export class ConcreteHyperlink extends XmlComponent {
|
||||
}
|
||||
|
||||
export class InternalHyperlink extends ConcreteHyperlink {
|
||||
constructor(options: { readonly children: ParagraphChild[]; readonly anchor: string }) {
|
||||
public constructor(options: { readonly children: ParagraphChild[]; readonly anchor: string }) {
|
||||
super(options.children, uniqueId(), options.anchor);
|
||||
}
|
||||
}
|
||||
|
||||
export class ExternalHyperlink extends XmlComponent {
|
||||
constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) {
|
||||
public constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) {
|
||||
super("w:externalHyperlink");
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { Attributes, XmlComponent } from "@file/xml-components";
|
||||
|
||||
export class OutlineLevel extends XmlComponent {
|
||||
constructor(public readonly level: number) {
|
||||
public constructor(public readonly level: number) {
|
||||
super("w:outlineLvl");
|
||||
|
||||
this.root.push(
|
||||
|
@ -5,7 +5,7 @@ import { TextAttributes } from "../run/text-attributes";
|
||||
import { IPageReferenceOptions } from "./pageref-properties";
|
||||
|
||||
export class PageReferenceFieldInstruction extends XmlComponent {
|
||||
constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
|
||||
public constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
|
||||
super("w:instrText");
|
||||
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { PageReferenceFieldInstruction } from "./pageref-field-instruction";
|
||||
import type { IPageReferenceOptions } from "./pageref-properties";
|
||||
|
||||
export class PageReference extends Run {
|
||||
constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
|
||||
public constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
|
||||
super({
|
||||
children: [new Begin(true), new PageReferenceFieldInstruction(bookmarkId, options), new End()],
|
||||
});
|
||||
|
Reference in New Issue
Block a user