(
attr: DataModelAttribute | DataFieldAttribute | InternalAttribute,
name: string,
)
| 388 | * Gets the value of the argument with the given name from the given attribute. Returns `undefined` if no such argument is found or if the argument value cannot be determined. |
| 389 | */ |
| 390 | export function getAttributeArg( |
| 391 | attr: DataModelAttribute | DataFieldAttribute | InternalAttribute, |
| 392 | name: string, |
| 393 | ): Expression | undefined { |
| 394 | return attr.args.find((arg) => arg.$resolvedParam?.name === name)?.value; |
| 395 | } |
| 396 | |
| 397 | /** |
| 398 | * Gets the literal value of the argument with the given name from the given attribute. Returns `undefined` if no such argument is found or if the argument value cannot be determined or is not a literal. |
no test coverage detected