Skip to main content

Function: getVariableInScopeChain()

function getVariableInScopeChain(
scope: Readonly<Readonly<Scope> | null>,
variableName: string
): ScopeVariable | null;

Defined in: _internal/scope-variable.ts:19

Resolve a variable binding by walking the current scope and all parent scopes.

Parametersโ€‹

scopeโ€‹

Readonly< | Readonly<Scope> | null>

Initial scope to inspect.

variableNameโ€‹

string

Identifier name to resolve.

Returnsโ€‹

ScopeVariable | null

Matched variable binding from the nearest scope chain; otherwise null.