piotrwitek / utility-types

Collection of utility types, complementing TypeScript built-in mapped types and aliases (think "lodash" for static types).
MIT License
5.54k stars 230 forks source link

Can Intersection give an example #164

Open xuwenhao0803 opened 3 years ago

xuwenhao0803 commented 3 years ago

Why does Intersection need Extract<keyof T, keyof U> & Extract<keyof U, keyof T> to write Extract<keyof T, keyof U> or Extract<keyof U, keyof T> separately?