getAnnotation
Import from @varavel/vdl-plugin-sdk/utils/ir.
Returns the first annotation that matches the provided name.
Annotation names are compared exactly as stored in the IR, without adding or
removing an @ prefix.
Parameters
| Parameter | Type | Description |
|---|---|---|
annotations |
Annotation[] | undefined |
Annotation list to search. |
name |
string |
Annotation name to match. |
Returns
Annotation | undefined
The matching annotation, or undefined when it is not present.