Skip to main content
values.VFunction The type of the v.function() validator.

Type parameters

Hierarchy

  • BaseValidator<Type, IsOptional> ↳ VFunction

Constructors

constructor

• new VFunction<Type, IsOptional>(«destructured»)

Type parameters

Parameters

Overrides

BaseValidator&lt;Type, IsOptional&gt;.constructor

Properties

type

• Readonly type: Type Only for TypeScript, the TS type of the JS values validated by this validator.

Inherited from

BaseValidator.type

fieldPaths

• Readonly fieldPaths: never Only for TypeScript, if this an Object validator, then this is the TS type of its property names.

Inherited from

BaseValidator.fieldPaths

isOptional

• Readonly isOptional: IsOptional Whether this is an optional Object property value validator.

Inherited from

BaseValidator.isOptional

isConvexValidator

• Readonly isConvexValidator: true Always "true".

Inherited from

BaseValidator.isConvexValidator

kind

• 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">

Overrides

BaseValidator.optional