v.function() validator.
Type parameters
Hierarchy
-
BaseValidator<Type,IsOptional> ↳VFunction
Constructors
constructor
• new VFunction<Type, IsOptional>(«destructured»)
Type parameters
Parameters
Overrides
BaseValidator<Type, IsOptional>.constructorProperties
type
•Readonly type: Type
Only for TypeScript, the TS type of the JS values validated
by this validator.
Inherited from
BaseValidator.typefieldPaths
•Readonly fieldPaths: never
Only for TypeScript, if this an Object validator, then
this is the TS type of its property names.
Inherited from
BaseValidator.fieldPathsisOptional
•Readonly isOptional: IsOptional
Whether this is an optional Object property value validator.
Inherited from
BaseValidator.isOptionalisConvexValidator
•Readonly isConvexValidator: true
Always "true".
Inherited from
BaseValidator.isConvexValidatorkind
•Readonly kind: "function"
The kind of validator, "function".
fnType
•Readonly fnType: undefined | FunctionType
The type of function the handle names, if one was given.
This is only enforced during typechecking and will not be validated at
runtime.
args
•Readonly args: undefined | GenericValidator
The validator for the function’s arguments, if one was given.
This is only enforced during typechecking and will not be validated at
runtime.
returns
•Readonly returns: undefined | GenericValidator
The validator for the function’s return value, if one was given.
This is only enforced during typechecking and will not be validated at
runtime.
Methods
optional
▸ optional():VFunction<undefined | Type, "optional">
Allow this validated field to be absent.
Returns
VFunction<undefined | Type, "optional">