实现一个通用的工具类型 IsOdd<T> ,判断是否为奇数,如果是奇数返回 true ,反之返回 false 。
IsOdd<T>
true
false
例如:
type Res = IsOdd<5> // expected to be true
TypeScript