Resolve typing errors after TypeScript upgrade

This commit is contained in:
J. Ryan Stinnett
2021-01-27 12:42:37 +00:00
parent ea706189a2
commit 84b1f2e6c6
11 changed files with 14 additions and 16 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ export abstract class AsyncStoreWithClient<T extends Object> extends AsyncStore<
})(dispatcher);
}
protected get matrixClient(): MatrixClient {
get matrixClient(): MatrixClient {
return this.readyStore.mxClient;
}
@@ -55,7 +55,7 @@ export abstract class AsyncStoreWithClient<T extends Object> extends AsyncStore<
// Default implementation is to do nothing.
}
protected abstract async onAction(payload: ActionPayload);
protected abstract onAction(payload: ActionPayload): Promise<void>;
protected async onDispatch(payload: ActionPayload) {
await this.onAction(payload);
-4
View File
@@ -89,10 +89,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> {
return this.algorithm.getOrderedRooms();
}
public get matrixClient(): MatrixClient {
return super.matrixClient;
}
// Intended for test usage
public async resetStore() {
await this.reset();