Open
Description
Code to reproduce:
import * as v from 'valibot';
const S1 = v.pipe(
v.optional(v.number()),
v.transform(() => 'success')
);
type T1 = v.InferOutput<typeof S1>;
// expected type error when assign undefined
const test1: T1 = undefined;
const S2 = v.object({
s1: S1,
});
type T2 = v.InferOutput<typeof S2>;
// inconsistent ability to assign undefined
const test2: T2['s1'] = undefined;