Skip to content

Scope context

const ScopeContext: ComponentContext<OutputScope>

Accessor

import { useScope } from "@alloy-js/core";
const myContext = useScope();

Context interface

binderBinder context interface

The binder that created this scope.

childrenSet<Scope context interface>

The scopes nested within this scope.

flagsOutputScopeFlags

The flags that describe this scope.

getSymbolNames() => Set<string>

Get the names of all symbols in this scope.

kindoptionalstring

The kind of scope. Subtypes will likely provide a set of known scope kinds. The kind is not used by the binder itself.

namestring

The name of the scope.

owneroptionalMemberDeclaration context interface

The symbol that owns this scope. This is only defined for scopes that have the [unresolved link] flag.

parentScope context interface | undefined

The container of this scope.

symbolsSet<MemberDeclaration context interface>

The symbols defined within this scope.

symbolsByRefkeyMap<Refkey, MemberDeclaration context interface>

The symbols defined within this scope, indexed by refkey.