Can typescript infer from ternary operator? - Theo's Typesafe Cult