add some missing types

This commit is contained in:
wuyudi 2023-02-08 02:34:37 +09:00
parent 7076c324bb
commit bc13374409

View file

@ -1,11 +1,13 @@
import EventEmitter from 'events';
import { MatrixClient } from 'matrix-js-sdk';
import appDispatcher from '../dispatcher';
import cons from './cons';
import RoomList from './RoomList';
class AccountData extends EventEmitter {
matrixClient: any;
matrixClient: MatrixClient;
roomList: any;
roomList: RoomList;
spaces: any;
@ -13,7 +15,7 @@ class AccountData extends EventEmitter {
categorizedSpaces: Set<unknown>;
constructor(roomList) {
constructor(roomList: RoomList) {
super();
this.matrixClient = roomList.matrixClient;
@ -127,6 +129,7 @@ class AccountData extends EventEmitter {
}
_listenEvents() {
// @ts-ignore
this.matrixClient.on('accountData', (event) => {
if (event.getType() !== cons.IN_CINNY_SPACES) return;
this._populateSpaceShortcut();