@bluelibs/runner - v6.3.1
    Preparing search index...

    Interface IValidationSchema<T>

    Generic validation schema interface that can be implemented by any validation library. Compatible with Zod, Yup, Joi, and other validation libraries.

    interface IValidationSchema<T = unknown> {
        parse(input: unknown): T;
        toJSONSchema?(): Record<string, unknown>;
    }

    Type Parameters

    • T = unknown
    Index

    Methods

    • Parse and validate the input data. Should throw an error if validation fails. Can transform the data if the schema supports transformations.

      Parameters

      • input: unknown

      Returns T

    • Optional JSON Schema export for tooling/documentation use-cases.

      Returns Record<string, unknown>