---
source: crates/normalize-typegen/tests/codegen.rs
assertion_line: 116
expression: output
---
// Auto-generated by normalize-typegen
import * as v from "valibot";

import type { InferOutput } from "valibot";

/** Physical address */
export const AddressSchema = v.object({
  city: v.string(),
  country: v.string(),
  postalCode: v.optional(v.string()),
  street: v.string(),
});

export type Address = InferOutput<typeof AddressSchema>;

/** User account status */
export const StatusSchema = v.picklist(["pending", "active", "suspended", "deleted"]);

export type Status = InferOutput<typeof StatusSchema>;

/** A user account */
export const UserSchema = v.object({
  address: v.optional(AddressSchema),
  age: v.optional(v.pipe(v.number(), v.integer())),
  /** Email address */
  email: v.string(),
  /** Unique identifier */
  id: v.string(),
  metadata: v.optional(v.record(v.string(), v.string())),
  name: v.optional(v.string()),
  status: StatusSchema,
  tags: v.optional(v.array(v.string())),
});

export type User = InferOutput<typeof UserSchema>;
