Conform more of the codebase to strictNullChecks (#10672)
* Conform more of the codebase to `strictNullChecks` * Iterate * Iterate * Iterate * Iterate * Conform more of the codebase to `strictNullChecks` * Iterate * Update record key
This commit is contained in:
committed by
GitHub
parent
792a39a39b
commit
be5928cb64
@@ -27,7 +27,7 @@ export enum CachedRoomKey {
|
||||
NotificationVolume,
|
||||
}
|
||||
|
||||
export class RoomEchoChamber extends GenericEchoChamber<RoomEchoContext, CachedRoomKey, RoomNotifState> {
|
||||
export class RoomEchoChamber extends GenericEchoChamber<RoomEchoContext, CachedRoomKey, RoomNotifState | undefined> {
|
||||
private properties = new Map<CachedRoomKey, RoomNotifState>();
|
||||
|
||||
public constructor(context: RoomEchoContext) {
|
||||
@@ -67,11 +67,12 @@ export class RoomEchoChamber extends GenericEchoChamber<RoomEchoContext, CachedR
|
||||
|
||||
// ---- helpers below here ----
|
||||
|
||||
public get notificationVolume(): RoomNotifState {
|
||||
public get notificationVolume(): RoomNotifState | undefined {
|
||||
return this.getValue(CachedRoomKey.NotificationVolume);
|
||||
}
|
||||
|
||||
public set notificationVolume(v: RoomNotifState) {
|
||||
public set notificationVolume(v: RoomNotifState | undefined) {
|
||||
if (v === undefined) return;
|
||||
this.setValue(
|
||||
_t("Change notification settings"),
|
||||
CachedRoomKey.NotificationVolume,
|
||||
|
||||
Reference in New Issue
Block a user