Changeset View
Changeset View
Standalone View
Standalone View
lib/types/thread-types-enum.js
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
export const communitySubthreads: $ReadOnlyArray<number> = Object.freeze([ | export const communitySubthreads: $ReadOnlyArray<number> = Object.freeze([ | ||||
threadTypes.COMMUNITY_OPEN_SUBTHREAD, | threadTypes.COMMUNITY_OPEN_SUBTHREAD, | ||||
threadTypes.COMMUNITY_OPEN_ANNOUNCEMENT_SUBTHREAD, | threadTypes.COMMUNITY_OPEN_ANNOUNCEMENT_SUBTHREAD, | ||||
threadTypes.COMMUNITY_SECRET_SUBTHREAD, | threadTypes.COMMUNITY_SECRET_SUBTHREAD, | ||||
threadTypes.COMMUNITY_SECRET_ANNOUNCEMENT_SUBTHREAD, | threadTypes.COMMUNITY_SECRET_ANNOUNCEMENT_SUBTHREAD, | ||||
]); | ]); | ||||
export function threadTypeIsCommunityRoot(threadType: ThreadType): boolean { | export function threadTypeIsCommunityRoot( | ||||
threadType: ThreadType | number, | |||||
): boolean { | |||||
return communityThreadTypes.includes(threadType); | return communityThreadTypes.includes(threadType); | ||||
} | } | ||||
export function threadTypeIsAnnouncementThread( | export function threadTypeIsAnnouncementThread( | ||||
threadType: ThreadType, | threadType: ThreadType, | ||||
): boolean { | ): boolean { | ||||
return announcementThreadTypes.includes(threadType); | return announcementThreadTypes.includes(threadType); | ||||
} | } |