Is it possible to check whether an interface has a required field using Typescript's Conditional Types?
type AllRequired = { a: string; b: string }
type PartiallyRequired = { a: string; b?: string }
type Optional = { a?: string; b?: string }
// Is it possible to change this, so the below works
type HasRequiredField<T> = T extends {} ? true : false
type A = HasRequiredField<AllRequired> // true
type B = HasRequiredField<PartiallyRequired> // true
type C = HasRequiredField<Optional> // false