interface Person {
name?: string;
}
const isPerson = isRecordOf<Person>({ name: optional(isString) });
isPerson({}) >>
{
valid: true,
parsed: { name: undefined },
};
isPerson({ name: "Joel" }) >>
{
valid: true,
parsed: { name: "Joel" },
};
Allow a validator to accept undefined inputs