Say I have a list of booleans:
const a: boolean[] = [true, false, false];
Can I build a type conditional that fires only when at least one of the booleans is true?
I can do it for the case where they're all true:
type BList = true[] | false[];
type AreAllTrue<T extends BList> = T[number] extends true ? true : false;
const a: BList = [true, true, true];
const b: AreAllTrue<typeof a> = true; // This compiles
const c: AreAllTrue<typeof a> = false; // This doesn't (as expected)
// type AnyAreTrue<???> = ???
But I need the list to have both true and false, not just a list full of one type of boolean.