diff --git a/lib/utils/role-utils.js b/lib/utils/role-utils.js --- a/lib/utils/role-utils.js +++ b/lib/utils/role-utils.js @@ -14,7 +14,6 @@ type ThreadRolePermissionsBlob, type UserSurfacedPermission, } from '../types/thread-permission-types.js'; -import type { LegacyRoleInfo } from '../types/thread-types'; import { threadTypes } from '../types/thread-types-enum.js'; function constructRoleDeletionMessagePrompt( @@ -59,7 +58,7 @@ function useRolesFromCommunityThreadInfo( threadInfo: ThreadInfo, memberInfos: $ReadOnlyArray, -): $ReadOnlyMap { +): $ReadOnlyMap { // Our in-code system has chat-specific roles, while the // user-surfaced system has roles only for communities. We retrieve roles // from the top-level community thread for accuracy, with a rare fallback @@ -74,10 +73,7 @@ community ? threadInfoSelector(state)[community] : null, ); const topMostThreadInfo = communityThreadInfo || threadInfo; - const roleMap = new Map< - string, - ?LegacyRoleInfo | ?MinimallyEncodedRoleInfo, - >(); + const roleMap = new Map(); if (topMostThreadInfo.type === threadTypes.GENESIS) { memberInfos.forEach(memberInfo =>