symbolForRefkey
Get a ref to the symbol for the given refkey using the current binder. The value of the ref will be undefined when no symbol with that refkey has been created.
import { symbolForRefkey } from "@alloy-js/core";
function symbolForRefkey(refkey: Refkeyable): Ref<OutputSymbol | undefined, OutputSymbol | undefined>;
Parameters
Section titled “Parameters”refkey |
|
Returns
Section titled “Returns”Ref<MemberDeclaration context interface | undefined, MemberDeclaration context interface | undefined>
Remarks
Section titled “Remarks”This API may return a ref for undefined, but that does not mean that the symbol is not found. The symbol you’re looking for may not have been declared yet. When the symbol is declared, the ref will be updated with the symbol.