typescriptのconditional typeでundefinedを含むかどうかで分岐する
code:ts
type Hoge<T> = {
K in keyof T
: undefined extends T
K
? SomeType : OtherType
}
https://github.com/microsoft/TypeScript/issues/23126