MCPcopy Create free account
hub / github.com/angular/angular / refName

Function refName

packages/compiler-cli/preprocessor/src/compiler-utils.ts:551–557  ·  view source on GitHub ↗
(ref: nga.ReferenceMetadata)

Source from the content-addressed store, hash-verified

549
550/** Identifier a reference resolves to in the emitting file (local binding or exported symbol). */
551export function refName(ref: nga.ReferenceMetadata): string {
552 const name = ref.localAlias ?? ref.consumerImport?.symbol ?? ref.typecheckImport?.symbol;
553 if (name === undefined) {
554 throw new Error('ReferenceMetadata has neither a local binding nor an import path');
555 }
556 return name;
557}
558
559export function refToExpression(ref: nga.ReferenceMetadata): o.Expression {
560 if (ref.localAlias) {

Callers 2

refToExpressionFunction · 0.85
compileNgModuleDefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected