diff --git a/packages/compiler-cli/src/ngtsc/host/src/reflection.ts b/packages/compiler-cli/src/ngtsc/host/src/reflection.ts index d47f27c269..bfea18a9ac 100644 --- a/packages/compiler-cli/src/ngtsc/host/src/reflection.ts +++ b/packages/compiler-cli/src/ngtsc/host/src/reflection.ts @@ -53,9 +53,9 @@ export enum ClassMemberKind { */ export interface ClassMember { /** - * TypeScript reference to the class member itself. + * TypeScript reference to the class member itself, or null if it is not applicable. */ - node: ts.Node; + node: ts.Node|null; /** * Indication of which type of member this is (property, method, etc). diff --git a/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts b/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts index 66f4e66648..17b831087f 100644 --- a/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts +++ b/packages/compiler-cli/src/ngtsc/metadata/src/resolver.ts @@ -544,7 +544,7 @@ class StaticInterpreter { throw new Error(`attempting to call something that is not a function: ${lhs}`); } else if (!isFunctionOrMethodReference(lhs)) { throw new Error( - `calling something that is not a function declaration? ${ts.SyntaxKind[lhs.node.kind]}`); + `calling something that is not a function declaration? ${ts.SyntaxKind[lhs.node.kind]} (${node.getText()})`); } const fn = lhs.node;