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