( category: string, primaryName: string, alternativeName: string )
| 21 | } |
| 22 | |
| 23 | export function isComplementaryPatternConflict( |
| 24 | category: string, |
| 25 | primaryName: string, |
| 26 | alternativeName: string |
| 27 | ): boolean { |
| 28 | const set = complementaryPairs.get(category); |
| 29 | if (!set) return false; |
| 30 | |
| 31 | const primary = normalizePatternName(primaryName); |
| 32 | const alternative = normalizePatternName(alternativeName); |
| 33 | |
| 34 | if (!set.has(primary)) return false; |
| 35 | if (!set.has(alternative)) return false; |
| 36 | |
| 37 | return primary !== alternative; |
| 38 | } |
| 39 | |
| 40 | export function isComplementaryPatternCategory(category: string, patternNames: string[]): boolean { |
| 41 | const set = complementaryPairs.get(category); |
no test coverage detected