Handling private fields is likely impossible without unsafely casting away the private, which I don't want to do. In either case, we can just fall back to the more general contra over a recordOf. Still, an optional foo?: Bar field should not force the user to either use foo: Bar | undefined or fall back to contra.
Handling private fields is likely impossible without unsafely casting away the
private
, which I don't want to do. In either case, we can just fall back to the more generalcontra
over arecordOf
. Still, an optionalfoo?: Bar
field should not force the user to either usefoo: Bar | undefined
or fall back tocontra
.