Page MenuHomePhabricator

D12493.id41730.diff
No OneTemporary

D12493.id41730.diff

diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -45,7 +45,6 @@
MemberInfoWithPermissions,
RoleInfo,
ThreadInfo,
- MemberInfoSansPermissions,
} from '../types/minimally-encoded-thread-permissions-types.js';
import {
decodeMinimallyEncodedRoleInfo,
@@ -313,13 +312,15 @@
.map(memberInfo => memberInfo.id);
}
-function threadOtherMembers<
- T:
- | LegacyMemberInfo
- | MemberInfoWithPermissions
- | MemberInfoSansPermissions
- | RelativeMemberInfo,
->(memberInfos: $ReadOnlyArray<T>, viewerID: ?string): $ReadOnlyArray<T> {
+type MemberIDAndRole = {
+ +id: string,
+ +role: ?string,
+ ...
+};
+function threadOtherMembers<T: MemberIDAndRole>(
+ memberInfos: $ReadOnlyArray<T>,
+ viewerID: ?string,
+): $ReadOnlyArray<T> {
return memberInfos.filter(
memberInfo => memberInfo.role && memberInfo.id !== viewerID,
);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 8:13 AM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2600226
Default Alt Text
D12493.id41730.diff (953 B)

Event Timeline