Use new eslint-plugin-functional instead of tslint-immutable

This commit is contained in:
Dolan Miu
2022-09-15 20:00:50 +01:00
parent d020d59b11
commit e90d97b813
70 changed files with 321 additions and 436 deletions

View File

@ -7,10 +7,10 @@ import { BookmarkEndAttributes, BookmarkStartAttributes } from "./bookmark-attri
export class Bookmark {
public readonly start: BookmarkStart;
public readonly children: ParagraphChild[];
public readonly children: readonly ParagraphChild[];
public readonly end: BookmarkEnd;
public constructor(options: { readonly id: string; readonly children: ParagraphChild[] }) {
public constructor(options: { readonly id: string; readonly children: readonly ParagraphChild[] }) {
const linkId = uniqueNumericId();
this.start = new BookmarkStart(options.id, linkId);

View File

@ -13,7 +13,7 @@ export enum HyperlinkType {
export class ConcreteHyperlink extends XmlComponent {
public readonly linkId: string;
public constructor(children: ParagraphChild[], relationshipId: string, anchor?: string) {
public constructor(children: readonly 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 {
public constructor(options: { readonly children: ParagraphChild[]; readonly anchor: string }) {
public constructor(options: { readonly children: readonly ParagraphChild[]; readonly anchor: string }) {
super(options.children, uniqueId(), options.anchor);
}
}
export class ExternalHyperlink extends XmlComponent {
public constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) {
public constructor(public readonly options: { readonly children: readonly ParagraphChild[]; readonly link: string }) {
super("w:externalHyperlink");
}
}