(items: T[])
| 85 | } |
| 86 | |
| 87 | function findDuplicates<T>(items: T[]): T[] { |
| 88 | const seen = new Set<T>(); |
| 89 | const duplicates = new Set<T>(); |
| 90 | |
| 91 | for (const item of items) { |
| 92 | if (seen.has(item)) { |
| 93 | duplicates.add(item); |
| 94 | } else { |
| 95 | seen.add(item); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | return Array.from(duplicates); |
| 100 | } |
| 101 | |
| 102 | async function validateChallenges(): Promise<void> { |
| 103 | const problems = new Problems<"_list.json", never>("Challenges", {}); |
no test coverage detected