UnionValidator
Table of contents
Public class
Signature
class UnionValidator<
Key extends string,
Config extends UnionValidatorConfig<Key, Config>,
UnknownValue = never,
> extends Validator<TypeOf<Config[keyof Config]> | UnknownValue> {}
References
Source
packages/validate/src/lib/validation.ts
Constructor
Public constructor
Constructs a new instance of the UnionValidator
class
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Methods
validateUnknownVariants()
Public method
Signature
validateUnknownVariants<Unknown>(
unknownValueValidation: (value: object, variant: string) => Unknown
): UnionValidator<Key, Config, Unknown>
Parameters
Name | Description |
---|---|
|
|
Returns
UnionValidator<Key, Config, Unknown>
References