Type Helpers

Infer schema types

Use the `t.inferSchema` helper to extract TypeScript types from your schemas.

import { t } from "@/val.config";

const userSchema = s.object({
  name: s.string(),
  age: s.number(),
  email: s.string().nullable()
});

export type User = t.inferSchema<typeof userSchema>;
// Type: { name: string; age: number; email: string | null }