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, viewerID: ?string): $ReadOnlyArray { +type MemberIDAndRole = { + +id: string, + +role: ?string, + ... +}; +function threadOtherMembers( + memberInfos: $ReadOnlyArray, + viewerID: ?string, +): $ReadOnlyArray { return memberInfos.filter( memberInfo => memberInfo.role && memberInfo.id !== viewerID, );