UnionToIntersection
code:ts
type UnionToIntersection<U> = (
U extends unknown ? (k: U) => void : never
) extends (k: infer I) => void
? I
: never;
https://qiita.com/suin/items/93eb9c328ee404fdfabc