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
Similar to #106 there is another case where fishery produces a value that is incompatible to the defined type constraint.
To Reproduce
interfaceBar{firstRequiredProperty: string;secondRequiredProperty: number;}interfaceFoo{optionalProperty?: Bar}constfooFactory=Factory.define<Foo>(()=>{return{};// I like to have the minimal shape of the interface as the default});constvalue=fooFactory.build({optionalProperty: {firstRequiredProperty: 'foo'}});// produces type `Foo`, but the actual value does not conform to `Foo` because `optionalProperty.secondRequiredProperty` is missing
Additional context
I think #113 might be related. I’m aware of associations, but as far as I can see associations could only solve the issue when I’m willing to provide a default value for optionalProperty, which I do not want.
The text was updated successfully, but these errors were encountered:
Description
Similar to #106 there is another case where fishery produces a value that is incompatible to the defined type constraint.
To Reproduce
Additional context
I think #113 might be related. I’m aware of
associations
, but as far as I can seeassociations
could only solve the issue when I’m willing to provide a default value foroptionalProperty
, which I do not want.The text was updated successfully, but these errors were encountered: