TS中Omit Pick Exclude区别&&关系
type T1 = { a: 'a', b: 'b',}
type T2 = 'a' | 'b'
type p3 = Omit<T1, 'a'> // { b: 'b' }type p6 = Pick<T1, Exclude<T2, 'a'>> // { b: 'b' }
type P4 = Exclude<T2, 'a'> // 'b'
type p5 = Pick<T1, 'a'> // {a: 'a'}
转载自:https://segmentfault.com/a/1190000041822869