Union Type ๅ้ ๅพ
type IsString<T> = T extends string ? "yes" : "no";
type T = IsString<"a" | 2 | "c">; // "yes" | "no"Union Type ๆๆๅ้ ็็็นๆง๏ผ
type T =
| ("a" extends string ? "yes" : "no")
| ( 2 extends string ? "yes" : "no")
| ("c" extends string ? "yes" : "no");