forked from mystiq/hydrogen-web
Avoid casting to any when a more specific type is possible
This commit is contained in:
parent
bef02d238f
commit
f34ee53a12
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ export class RoomMemberStore {
|
|||
|
||||
set(member: MemberData): void {
|
||||
// Object.assign would be more typesafe, but small objects
|
||||
(member as any).key = encodeKey(member.roomId, member.userId);
|
||||
(member as MemberStorageEntry).key = encodeKey(member.roomId, member.userId);
|
||||
this._roomMembersStore.put(member as MemberStorageEntry);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ export class TimelineFragmentStore {
|
|||
// depends if we want to do anything smart with fragment ids,
|
||||
// like give them meaning depending on range. not for now probably ...
|
||||
add(fragment: Fragment): void {
|
||||
(fragment as any).key = encodeKey(fragment.roomId, fragment.id);
|
||||
(fragment as FragmentEntry).key = encodeKey(fragment.roomId, fragment.id);
|
||||
this._store.add(fragment as FragmentEntry);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue