VDL Plugin SDK

annotation

Import from @varavel/vdl-plugin-sdk/testing.

function annotation(name, argument?): Annotation;

Creates an Annotation with the given name and an optional literal argument.

Parameters

ParameterTypeDescription
namestringAnnotation name without the @ prefix.
argument?LiteralValueOptional literal argument attached to the annotation.

Returns

Annotation

An Annotation with a default position.

Example

annotation("minLength", intLiteral(3));
// returns an annotation named "minLength" with an int literal argument