• Adds a validator to a given adapter method. Throws an error if the method does not exist. This method is immutable.

    Type Parameters

    Parameters

    • adapter: A
    • methodName: {
          [Key in string | number | symbol]-?: A[Key] extends HandlerAndValidators<Record<string, Predicate>>
              ? Key
              : never
      }[keyof A]
    • validatorName: string
    • validator: Predicate

      validation predicate to add

    Returns A

    new adapter with validator added

Generated using TypeDoc