Skip to content
Français

StandardJsonSchema

import type { StandardJsonSchema } from "@elie-laloum/outpost";
  • ~standardRequired
    { readonly validate: (input: unknown) => { readonly issues: readonly unknown[]; } | { readonly value: Input; readonly issues?: undefined; } | Promise<{ readonly issues: readonly unknown[]; } | { readonly value: Input; readonly issues?: undefined; }>; } & { readonly jsonSchema: { input(options: { readonly target: string; }): Record<string, unknown>; }; }
    Standard Schema properties: validate() checks a value and jsonSchema.input() converts the input type to JSON Schema.
export interface StandardJsonSchema<Input> {
  readonly "~standard": StandardValidator<Input>["~standard"] & {
    readonly jsonSchema: {
      input(options: { readonly target: string }): Record<string, unknown>;
    };
  };
}