Conditional helper: only one true value.
true
Tuple of boolean conditions
Result if exactly one condition is true
Result otherwise
Resolves to Then if the tuple contains exactly one true value, otherwise Else.
Then
Else
type A = IfOnlyOne< [ false, true, false ], 'yes', 'no' >; // 'yes'type B = IfOnlyOne< [ true, true, false ], 'yes', 'no' >; // 'no' Copy
type A = IfOnlyOne< [ false, true, false ], 'yes', 'no' >; // 'yes'type B = IfOnlyOne< [ true, true, false ], 'yes', 'no' >; // 'no'
Conditional helper: only one
truevalue.