diff --git a/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts b/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts index 17b831087f..acc8ff3f17 100644 --- a/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts +++ b/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts @@ -279,7 +279,7 @@ interface Context { absoluteModuleName: string|null; scope: Scope; foreignFunctionResolver? - (ref: Reference, + (ref: Reference, args: ReadonlyArray): ts.Expression|null; } @@ -528,7 +528,7 @@ class StaticInterpreter { value = this.visitExpression(member.value, context); } else if (member.implementation !== null) { value = new NodeReference(member.implementation, absoluteModuleName); - } else { + } else if (member.node) { value = new NodeReference(member.node, absoluteModuleName); } } @@ -670,7 +670,7 @@ class StaticInterpreter { } function isFunctionOrMethodReference(ref: Reference): - ref is Reference { + ref is Reference { return ts.isFunctionDeclaration(ref.node) || ts.isMethodDeclaration(ref.node); }