Does/will this correctly handle `| undefined` vs `?`, i.e. correct behavior under `exactOptionalPropertyTypes`?
Zod doesn't (yet[0]) and it's been a pain point for me.
Zod doesn't (yet[0]) and it's been a pain point for me.
import * as v from 'valibot';
const OptionalKeySchema = v.object({ key: v.optional(v.string()) });
type t1 = v.InferInput<typeof OptionalKeySchema>; // { key?: string }
const UndefinedKeySchema = v.object({ key: v.undefinedable(v.string()) });
type t2 = v.InferInput<typeof UndefinedKeySchema>; // { key: undefined }