(collections: Collection[], id: number)
| 131 | }; |
| 132 | |
| 133 | function findCollection(collections: Collection[], id: number): Collection | undefined { |
| 134 | for (const collection of collections) { |
| 135 | if (collection.id === id) { |
| 136 | return collection; |
| 137 | } |
| 138 | if (collection.children) { |
| 139 | const res = findCollection(collection.children, id); |
| 140 | if (res) return res; |
| 141 | } |
| 142 | } |
| 143 | return undefined; |
| 144 | } |
| 145 | |
| 146 | function findRequest(collections: Collection[], id: number): Request | undefined { |
| 147 | for (const collection of collections) { |
no outgoing calls
no test coverage detected