zerot
    Preparing search index...

    Type Alias ContractValidator<TInput, TOutput>

    ContractValidator: (input: TInput) => TOutput & { isValidator?: boolean }

    Defines a contract validator function. Validators can transform the input. Note: Validators are expected to throw ContractError on failure, not return it.

    Type Parameters

    • TInput = unknown

      The expected type of the input to be validated.

    • TOutput = any

      The expected type of the transformed output.

    The input to be validated and potentially transformed.

    The transformed input.