Skip to main content

Function: getStaticJsxAttributeStringValue()

getStaticJsxAttributeStringValue(attributeValue: Readonly<JSXElement | Literal | JSXExpression | null>): string | undefined

Defined in: _internal/estree-utils.ts:121

Resolve a string value from a JSX attribute value.

Supports plain string literals and JSX expression containers that wrap a static string literal or expression-free template literal.

Parameters​

attributeValue​

Readonly<JSXElement | Literal | JSXExpression | null>

JSX attribute value node to inspect.

Returns​

string | undefined

Static string value when available.