pick所有Required属性组成新type
interface I { a: string; b?: number; c: boolean | undefined;}type T = RequiredOnly<I>; // {a: string; c: boolean | undefined}type T2 = OptionalKeys<I>; // "b" Copy
interface I { a: string; b?: number; c: boolean | undefined;}type T = RequiredOnly<I>; // {a: string; c: boolean | undefined}type T2 = OptionalKeys<I>; // "b"
pick所有Required属性组成新type