isDeprecated
Import from @varavel/vdl-plugin-sdk/utils/deprecations.
function isDeprecated(annotations): boolean;
Reports whether an annotation list marks its symbol as deprecated.
Presence alone decides. Any argument shape still counts as deprecated;
argument handling belongs to getDeprecationMessage.
Parameters
| Parameter | Type | Description |
|---|---|---|
annotations | Annotation[] | undefined | Annotation list from any annotated IR node. |
Returns
boolean
True when a deprecated annotation is present.
Example
isDeprecated(typeDef.annotations);
// returns true when `@deprecated` is present