Resolve typing errors after TypeScript upgrade

This commit is contained in:
J. Ryan Stinnett 2021-01-20 13:40:46 +00:00
parent ea706189a2
commit 84b1f2e6c6
11 changed files with 14 additions and 16 deletions

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);

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();