(xs: Problem[], key: K)
| 1339 | |
| 1340 | if (problems) { |
| 1341 | const groupBy = <K extends keyof Problem & StringsKeys<Problem>>(xs: Problem[], key: K) => |
| 1342 | xs.reduce( |
| 1343 | (rv, problem) => { |
| 1344 | const path = problem[key]; |
| 1345 | |
| 1346 | (rv[path] ||= []).push(problem); |
| 1347 | |
| 1348 | return rv; |
| 1349 | }, |
| 1350 | {} as Record<string, Problem[]>, |
| 1351 | ); |
| 1352 | const problemsByPath = groupBy<"path">(problems, "path"); |
| 1353 | |
| 1354 | for (const path in problemsByPath) { |
nothing calls this directly
no outgoing calls
no test coverage detected