mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Avoid casting to any when a more specific type is possible
This commit is contained in:
parent
bef02d238f
commit
f34ee53a12
@ -52,7 +52,7 @@ export class RoomMemberStore {
|
|||||||
|
|
||||||
set(member: MemberData): void {
|
set(member: MemberData): void {
|
||||||
// Object.assign would be more typesafe, but small objects
|
// 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);
|
this._roomMembersStore.put(member as MemberStorageEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ export class TimelineFragmentStore {
|
|||||||
// depends if we want to do anything smart with fragment ids,
|
// depends if we want to do anything smart with fragment ids,
|
||||||
// like give them meaning depending on range. not for now probably ...
|
// like give them meaning depending on range. not for now probably ...
|
||||||
add(fragment: Fragment): void {
|
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);
|
this._store.add(fragment as FragmentEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user