Home / Function/ extractVariable() — ui Function Reference

extractVariable() — ui Function Reference

Architecture documentation for the extractVariable() function in registry.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  3ca325a3_7196_0491_f780_d2139a24dee6["extractVariable()"]
  c2827044_b928_a1b2_3033_3282c0588350["registry.ts"]
  3ca325a3_7196_0491_f780_d2139a24dee6 -->|defined in| c2827044_b928_a1b2_3033_3282c0588350
  0657e55f_4db1_fbf1_7517_70374cad1f6d["getFileMeta()"]
  0657e55f_4db1_fbf1_7517_70374cad1f6d -->|calls| 3ca325a3_7196_0491_f780_d2139a24dee6
  style 3ca325a3_7196_0491_f780_d2139a24dee6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/lib/registry.ts lines 172–185

function extractVariable(sourceFile: SourceFile, name: string) {
  const variable = sourceFile.getVariableDeclaration(name)
  if (!variable) {
    return null
  }

  const value = variable
    .getInitializerIfKindOrThrow(SyntaxKind.StringLiteral)
    .getLiteralValue()

  variable.remove()

  return value
}

Subdomains

Called By

Frequently Asked Questions

What does extractVariable() do?
extractVariable() is a function in the ui codebase, defined in deprecated/www/lib/registry.ts.
Where is extractVariable() defined?
extractVariable() is defined in deprecated/www/lib/registry.ts at line 172.
What calls extractVariable()?
extractVariable() is called by 1 function(s): getFileMeta.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free