( current: TCandidate | null | undefined, candidate: TCandidate )
| 33 | } |
| 34 | |
| 35 | export function getPreferredSplatCandidate<TCandidate extends SplatCandidate>( |
| 36 | current: TCandidate | null | undefined, |
| 37 | candidate: TCandidate |
| 38 | ): TCandidate { |
| 39 | if (!current) return candidate; |
| 40 | return compareSplatCandidates(candidate, current) > 0 ? candidate : current; |
| 41 | } |
| 42 | |
| 43 | export function sortSplatCandidatesByPreference<TCandidate extends SplatCandidate>( |
| 44 | candidates: readonly TCandidate[] |
no test coverage detected