fix ts lint error by making methods abstract

This commit is contained in:
Bruno Windels 2021-08-18 18:15:03 +02:00
parent e1481f2947
commit 4b5f5ddffa
2 changed files with 7 additions and 15 deletions

View File

@ -22,20 +22,15 @@ interface FragmentIdComparer {
compare: (a: number, b: number) => number
}
export class BaseEntry {
protected _fragmentIdComparer: FragmentIdComparer
constructor(fragmentIdComparer: FragmentIdComparer) {
this._fragmentIdComparer = fragmentIdComparer;
export abstract class BaseEntry {
constructor(
protected readonly _fragmentIdComparer: FragmentIdComparer
) {
}
get fragmentId(): number {
throw new Error("unimplemented");
}
get entryIndex(): number {
throw new Error("unimplemented");
}
abstract get fragmentId(): number;
abstract get entryIndex(): number;
abstract updateFrom(other: BaseEntry): void;
compare(otherEntry: BaseEntry): number {
if (this.fragmentId === otherEntry.fragmentId) {
@ -53,6 +48,4 @@ export class BaseEntry {
asEventKey(): EventKey {
return new EventKey(this.fragmentId, this.entryIndex);
}
updateFrom(other: BaseEntry) {}
}

View File

@ -33,7 +33,6 @@ export class EventEntry extends BaseEventEntry {
}
updateFrom(other) {
super.updateFrom(other);
if (other._decryptionResult && !this._decryptionResult) {
this._decryptionResult = other._decryptionResult;
}