( data: $ReadOnlyArray<CommunityDrawerItemData<T>>, id: string, )
| 84 | } |
| 85 | |
| 86 | function findThreadChildrenItems<T>( |
| 87 | data: $ReadOnlyArray<CommunityDrawerItemData<T>>, |
| 88 | id: string, |
| 89 | ): ?$ReadOnlyArray<CommunityDrawerItemData<T>> { |
| 90 | for (const item of data) { |
| 91 | if (item.threadInfo.id === id) { |
| 92 | return item.itemChildren; |
| 93 | } |
| 94 | const result = findThreadChildrenItems(item.itemChildren, id); |
| 95 | if (result) { |
| 96 | return result; |
| 97 | } |
| 98 | } |
| 99 | return undefined; |
| 100 | } |
| 101 | |
| 102 | function filterOutThreadAndDescendantIDs<T>( |
| 103 | idsToFilter: $ReadOnlyArray<string>, |
no outgoing calls
no test coverage detected