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

@ -6,7 +6,7 @@ import { MathBase } from "../n-ary";
import { MathBracketProperties } from "./math-bracket-properties";
export class MathAngledBrackets extends XmlComponent {
public constructor(options: { readonly children: MathComponent[] }) {
public constructor(options: { readonly children: readonly MathComponent[] }) {
super("m:d");
this.root.push(

View File

@ -6,7 +6,7 @@ import { MathBase } from "../n-ary";
import { MathBracketProperties } from "./math-bracket-properties";
export class MathCurlyBrackets extends XmlComponent {
public constructor(options: { readonly children: MathComponent[] }) {
public constructor(options: { readonly children: readonly MathComponent[] }) {
super("m:d");
this.root.push(

View File

@ -6,7 +6,7 @@ import { MathBase } from "../n-ary";
import { MathBracketProperties } from "./math-bracket-properties";
export class MathRoundBrackets extends XmlComponent {
public constructor(options: { readonly children: MathComponent[] }) {
public constructor(options: { readonly children: readonly MathComponent[] }) {
super("m:d");
this.root.push(new MathBracketProperties());

View File

@ -6,7 +6,7 @@ import { MathBase } from "../n-ary";
import { MathBracketProperties } from "./math-bracket-properties";
export class MathSquareBrackets extends XmlComponent {
public constructor(options: { readonly children: MathComponent[] }) {
public constructor(options: { readonly children: readonly MathComponent[] }) {
super("m:d");
this.root.push(

View File

@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "../math-component";
export class MathDenominator extends XmlComponent {
public constructor(children: MathComponent[]) {
public constructor(children: readonly MathComponent[]) {
super("m:den");
for (const child of children) {

View File

@ -5,8 +5,8 @@ import { MathDenominator } from "./math-denominator";
import { MathNumerator } from "./math-numerator";
export interface IMathFractionOptions {
readonly numerator: MathComponent[];
readonly denominator: MathComponent[];
readonly numerator: readonly MathComponent[];
readonly denominator: readonly MathComponent[];
}
export class MathFraction extends XmlComponent {

View File

@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "../math-component";
export class MathNumerator extends XmlComponent {
public constructor(children: MathComponent[]) {
public constructor(children: readonly MathComponent[]) {
super("m:num");
for (const child of children) {

View File

@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "../math-component";
export class MathFunctionName extends XmlComponent {
public constructor(children: MathComponent[]) {
public constructor(children: readonly MathComponent[]) {
super("m:fName");
for (const child of children) {

View File

@ -7,8 +7,8 @@ import { MathFunctionName } from "./math-function-name";
import { MathFunctionProperties } from "./math-function-properties";
export interface IMathFunctionOptions {
readonly children: MathComponent[];
readonly name: MathComponent[];
readonly children: readonly MathComponent[];
readonly name: readonly MathComponent[];
}
export class MathFunction extends XmlComponent {

View File

@ -4,7 +4,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "./math-component";
export interface IMathOptions {
readonly children: MathComponent[];
readonly children: readonly MathComponent[];
}
export class Math extends XmlComponent {

View File

@ -4,7 +4,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "../math-component";
export class MathBase extends XmlComponent {
public constructor(children: MathComponent[]) {
public constructor(children: readonly MathComponent[]) {
super("m:e");
for (const child of children) {

View File

@ -4,7 +4,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "../math-component";
export class MathSubScriptElement extends XmlComponent {
public constructor(children: MathComponent[]) {
public constructor(children: readonly MathComponent[]) {
super("m:sub");
for (const child of children) {

View File

@ -8,9 +8,9 @@ import { MathSubScriptElement } from "./math-sub-script";
import { MathSuperScriptElement } from "./math-super-script";
export interface IMathSumOptions {
readonly children: MathComponent[];
readonly subScript?: MathComponent[];
readonly superScript?: MathComponent[];
readonly children: readonly MathComponent[];
readonly subScript?: readonly MathComponent[];
readonly superScript?: readonly MathComponent[];
}
export class MathSum extends XmlComponent {

View File

@ -4,7 +4,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "../math-component";
export class MathSuperScriptElement extends XmlComponent {
public constructor(children: MathComponent[]) {
public constructor(children: readonly MathComponent[]) {
super("m:sup");
for (const child of children) {

View File

@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
import { MathComponent } from "../math-component";
export class MathDegree extends XmlComponent {
public constructor(children?: MathComponent[]) {
public constructor(children?: readonly MathComponent[]) {
super("m:deg");
if (!!children) {

View File

@ -7,8 +7,8 @@ import { MathDegree } from "./math-degree";
import { MathRadicalProperties } from "./math-radical-properties";
export interface IMathRadicalOptions {
readonly children: MathComponent[];
readonly degree?: MathComponent[];
readonly children: readonly MathComponent[];
readonly degree?: readonly MathComponent[];
}
export class MathRadical extends XmlComponent {

View File

@ -6,9 +6,9 @@ import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n-
import { MathPreSubSuperScriptProperties } from "./math-pre-sub-super-script-function-properties";
export interface IMathPreSubSuperScriptOptions {
readonly children: MathComponent[];
readonly subScript: MathComponent[];
readonly superScript: MathComponent[];
readonly children: readonly MathComponent[];
readonly subScript: readonly MathComponent[];
readonly superScript: readonly MathComponent[];
}
export class MathPreSubSuperScript extends XmlComponent {

View File

@ -6,8 +6,8 @@ import { MathBase, MathSubScriptElement } from "../../n-ary";
import { MathSubScriptProperties } from "./math-sub-script-function-properties";
export interface IMathSubScriptOptions {
readonly children: MathComponent[];
readonly subScript: MathComponent[];
readonly children: readonly MathComponent[];
readonly subScript: readonly MathComponent[];
}
export class MathSubScript extends XmlComponent {

View File

@ -6,9 +6,9 @@ import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n-
import { MathSubSuperScriptProperties } from "./math-sub-super-script-function-properties";
export interface IMathSubSuperScriptOptions {
readonly children: MathComponent[];
readonly subScript: MathComponent[];
readonly superScript: MathComponent[];
readonly children: readonly MathComponent[];
readonly subScript: readonly MathComponent[];
readonly superScript: readonly MathComponent[];
}
export class MathSubSuperScript extends XmlComponent {

View File

@ -6,8 +6,8 @@ import { MathBase, MathSuperScriptElement } from "../../n-ary";
import { MathSuperScriptProperties } from "./math-super-script-function-properties";
export interface IMathSuperScriptOptions {
readonly children: MathComponent[];
readonly superScript: MathComponent[];
readonly children: readonly MathComponent[];
readonly superScript: readonly MathComponent[];
}
export class MathSuperScript extends XmlComponent {