Closed bigpopakap closed 4 years ago
Closing this because it's stale-ish, but feel free to reopen if you have more thoughts.
Fair enough. I haven't found the time to come back to this. If/when I hopefully do get to play around with it, I can open up a new PR in the future. Sorry for leaving this open for so long!
I'm not 100% sure about this change, but it occurred to me while I was working on #30.
Should
additionalProperties
be treated as optional (as in, with aPartial<...>
)? Because after parsing an object, you can't actually be sure in the type system whetherparsedObject.someAdditionalProperty
is defined or not.One problem I can think of is that it softens the restriction when using
additionalProperties: S(false)
, because it'll enforcePartial<{ [k: string]: never }>
instead of the stricter{ [k: string]: never }
.Don't worry about a bunch of extra noise from me :) This will be my last PR for a little while and I thought I'd just put up this PR directly because it came up while working on #30 and I had the code written already.