InferOutput
Infer output type.
// Create object schema
const ObjectSchema = v.object({
key: v.pipe(
v.string(),
v.transform((input) => input.length)
),
});
// Infer object output type
type ObjectOutput = v.InferOutput<typeof ObjectSchema>; // { key: number }