Real-world inputs often encode booleans as strings or numbers. A Boolish union captures the allowed encodings, and narrowing with typeof and equality checks produces a real boolean. Be explicit about which spellings you accept and map each deterministically.
type Truthy = "yes" | "true" | 1 | true;
Keep branches small and clear so intent is obvious to readers and to the type checker.