Crypto Server
    Preparing search index...

    Type Alias ValidationResult<T>

    ValidationResult:
        | { valid: true; value: T }
        | { valid: false; error: ValidationError }

    Discriminated union returned by all validators. Check valid to narrow the type.

    Type Parameters

    • T

    Type Declaration

    • { valid: true; value: T }
      • valid: true

        Indicates the value passed validation.

      • value: T

        The validated and typed value.

    • { valid: false; error: ValidationError }
      • valid: false

        Indicates the value failed validation.

      • error: ValidationError

        Details about the validation failure.