getAnnotationArg
Import from @varavel/vdl-plugin-sdk/utils/ir.
Returns the raw literal argument stored in an annotation.
VDL annotations currently expose a single literal argument.
Pair this helper with unwrapLiteral when you need a plain JavaScript value.
Parameters
| Parameter | Type | Description |
|---|---|---|
annotations |
Annotation[] | undefined |
Annotation list to search. |
name |
string |
Annotation name whose argument should be returned. |
Returns
| LiteralValue
| undefined
The annotation argument as a LiteralValue, or undefined when the annotation or argument is missing.