Can Typescript's Conditional Types be used to determine if an interface includes a required field?
type AllRequired = { a: string; b: string }
type PartiallyRequired = { a: string; b?: string }
type Optional = { a?: string; b?: string }
// Can we modify this to make the following code work?
type HasRequiredField<T> = T extends {} ? true : false
type A = HasRequiredField<AllRequired> // true
type B = HasRequiredField<PartiallyRequired> // true
type C = HasRequiredField<Optional> // false