You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the defaults we generate may not pass Typescript's type checker. An incomplete cue.Value (one that has at least one required field without a default and therefore cannot be rendered to a concrete form like JSON) will fail, because the default const produced will lack any entry for that required field.
I think the simplest fix here is just to always generate our default consts with Partial<T>. We could do so conditionally based on a concreteness check, but until we're aware of a use case (@ryantxu?) that really requires a default not being Partial, this seems the best solution.
The text was updated successfully, but these errors were encountered:
Currently, the defaults we generate may not pass Typescript's type checker. An incomplete
cue.Value
(one that has at least one required field without a default and therefore cannot be rendered to a concrete form like JSON) will fail, because the default const produced will lack any entry for that required field.I think the simplest fix here is just to always generate our default consts with
Partial<T>
. We could do so conditionally based on a concreteness check, but until we're aware of a use case (@ryantxu?) that really requires a default not beingPartial
, this seems the best solution.The text was updated successfully, but these errors were encountered: