Skip to content

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

Parameter Type Description
name string Annotation name without the @ prefix.
argument? LiteralValue Optional 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