(
symbols: readonly ChangeImpactSymbol[],
cap: number,
)
| 74 | |
| 75 | /** The symbols worth asking about, in the order the change set reported them. */ |
| 76 | export function testCandidates( |
| 77 | symbols: readonly ChangeImpactSymbol[], |
| 78 | cap: number, |
| 79 | ): ChangeImpactSymbol[] { |
| 80 | const seen = new Set<string>(); |
| 81 | const out: ChangeImpactSymbol[] = []; |
| 82 | for (const symbol of symbols) { |
| 83 | const key = symbol.qualifiedName; |
| 84 | if (symbol.changeKind === 'module' || symbol.isTest === true || key === undefined || seen.has(key)) { |
| 85 | continue; |
| 86 | } |
| 87 | seen.add(key); |
| 88 | out.push(symbol); |
| 89 | if (out.length >= cap) { |
| 90 | break; |
| 91 | } |
| 92 | } |
| 93 | return out; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Test callers for as many affected symbols as the cap allows. |
no test coverage detected