实现
type IF<C extends boolean, T, F> = C extends true ? T : F;
type ExampleType = IF<true, string, number>; // ExampleType 为 string
type IF<C extends boolean, T, F> = C extends true ? T : F;
type ExampleType = IF<true, string, number>; // ExampleType 为 string