mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
fix ts lint error by making methods abstract
This commit is contained in:
parent
e1481f2947
commit
4b5f5ddffa
@ -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) {}
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ export class EventEntry extends BaseEventEntry {
|
||||
}
|
||||
|
||||
updateFrom(other) {
|
||||
super.updateFrom(other);
|
||||
if (other._decryptionResult && !this._decryptionResult) {
|
||||
this._decryptionResult = other._decryptionResult;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user