Description
When using the factory overrides to set a property explicitly to undefined this is always allowed even when the type constraint doesn’t accept undefined as a valid value.
To Reproduce
import { Factory } from 'fishery';
interface Foo {
bar: string;
}
const fooFactory = Factory.define<Foo>(() => {
return { bar: 'any-value' };
});
const result = fooFactory.build({ bar: undefined }); // result has the type Foo but its value is { bar: undefined } which is not a valid Foo
Additional context
It seems like this bug has been introduced with #44
Description
When using the factory overrides to set a property explicitly to
undefinedthis is always allowed even when the type constraint doesn’t acceptundefinedas a valid value.To Reproduce
Additional context
It seems like this bug has been introduced with #44