BUPKIS
    Preparing search index...

    Interface Props<Input, Output>

    The Standard Schema properties interface.

    Contains the actual validation logic and metadata required by the spec.

    interface Props<Input = unknown, Output = Input> {
        types?: Types<Input, Output>;
        validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
        vendor: string;
        version: 1;
    }

    Type Parameters

    • Input = unknown

      The input type accepted by the schema

    • Output = Input

      The output type produced after successful validation

    Index

    Properties

    types?: Types<Input, Output>

    Inferred types associated with the schema.

    Optional property that allows TypeScript type inference for the schema. Not all libraries may provide this.

    validate: (value: unknown) => Result<Output> | Promise<Result<Output>>

    Validates unknown input values.

    This function performs validation and returns either a success result with the validated/transformed data, or a failure result with validation issues. May return a Promise for async validation.

    Type Declaration

    vendor: string

    The vendor name of the schema library.

    Examples: 'zod', 'valibot', 'arktype', 'yup', etc.

    version: 1

    The version number of the standard.

    Currently only version 1 is defined. Future versions will increment this number to maintain backward compatibility.