Skip to main content

Function: getStaticStringValueFromExpressionOrIdentifier()

function getStaticStringValueFromExpressionOrIdentifier(
expression: Readonly<Expression>,
programNode: Readonly<TSESTree.Program>
): string | null;

Defined in: _internal/docusaurus-config-ast.ts:610

Resolve a static string value from a literal, template, or identifier bound to a static string expression in the same program.

Parametersโ€‹

expressionโ€‹

Readonly<Expression>

programNodeโ€‹

Readonly<TSESTree.Program>

Returnsโ€‹

string | null