Conform more of the codebase to strict typescript (#10841)

This commit is contained in:
Michael Telatynski
2023-05-25 09:39:23 +01:00
committed by GitHub
parent af78a5a2f5
commit 277a3c0146
12 changed files with 89 additions and 60 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ export class CallStore extends AsyncStoreWithClient<{}> {
this.calls.set(room.roomId, call);
this.callListeners.set(
call,
new Map<CallEvent, (...args: unknown[]) => unknown>([
new Map<CallEvent, (...args: any[]) => unknown>([
[CallEvent.ConnectionState, onConnectionState],
[CallEvent.Destroy, onDestroy],
]),
+6 -2
View File
@@ -42,8 +42,12 @@ export class RoomScrollStateStore {
return this.scrollStateMap.get(roomId);
}
public setScrollState(roomId: string, scrollState: ScrollState): void {
this.scrollStateMap.set(roomId, scrollState);
public setScrollState(roomId: string, scrollState: ScrollState | null): void {
if (scrollState === null) {
this.scrollStateMap.delete(roomId);
} else {
this.scrollStateMap.set(roomId, scrollState);
}
}
}