export class TimeSeries<T> {
private readonly originalArray: T[];
private readonly originalArrayLength: number;
private readonly dateTimeField: keyof T;
private readonly valueField: keyof T;
private absoluteChange: number | undefined;
constructor(originalArray: T[], dtField: keyof T, valueField: keyof T) {
this.dateTimeField = dtField;
this.valueField = valueField;
this.originalArray = originalArray;
this.originalArrayLength = originalArray.length;
}
calculateAbsoluteChange() {
this.absoluteChange=
this.originalArray[this.originalArrayLength][this.valueField] /
this.originalArray[0][this.valueField];
};
}
Ошибка в
calculateAbsoluteChange() {
this.absoluteChange=
this.originalArray[this.originalArrayLength][this.valueField] /
this.originalArray[0][this.valueField];
};
The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type
The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.