Binder context
The binder context provides the binder instance to all components. This context is provided by the output component.
const BinderContext: ComponentContext<Binder>
Accessor
Section titled “Accessor”import { useBinder } from "@alloy-js/core";
const myContext = useBinder();
Context interface
Section titled “Context interface”getSymbolForRefkey | (Refkeyable) => Ref<TSymbol | undefined> | Get a ref to the symbol associated with the given refkey. The value of the ref is undefined if the symbol has not been created yet. |
nameConflictResolver | optionalNameConflictResolver The name conflict resolver to use for this binder. | |
notifyScopeCreated | (OutputScope) => void | Notifies the binder that a scope has been created. |
notifySymbolCreated | (OutputSymbol) => void | Notifies the binder that a symbol has been created. |
notifySymbolDeleted | (OutputSymbol) => void | Notifies the binder that a symbol has been deleted. |
resolveDeclarationByKey | (TScope | undefined, Refkey, ResolveDeclarationByKeyOptions<TScope, TSymbol>) => Ref<ResolutionResult<TScope, TSymbol> | undefined> | Resolve the given refkey in the current scope. |