StandardSchemaProps #

The ~standard property of a Standard Schema.

Fields #

version1
vendorstring
validate(value: unknown): StandardSchemaResult<Output> | Promise<StandardSchemaResult<Output>>
typesoptional{ input: Input; output: Output }
inputInput
outputOutput
jsonSchemaoptional{ input: (options: { target: string }) => Record<string, unknown> }

Present on libraries that also follow Standard JSON Schema, such as Zod 4.2 and later.

input(options: { target: string }): Record<string, unknown>
Full type signature
TypeScript
interface StandardSchemaProps<Input = unknown, Output = Input> {
  readonly version: 1
  readonly vendor: string
  readonly validate: (value: unknown) => StandardSchemaResult<Output> | Promise<StandardSchemaResult<Output>>
  readonly types?: { input: Input; output: Output }
  readonly jsonSchema?: { input: (options: { target: string }) => Record<string, unknown> }
}

Edit this page

Comments