diff --git a/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts b/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts index aa52e502d8..7fddda5784 100644 --- a/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts +++ b/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts @@ -271,7 +271,7 @@ export class TypeScriptReflectionHost implements ReflectionHost { let valueDeclaration: ts.Declaration|undefined = undefined; if (symbol.valueDeclaration !== undefined) { valueDeclaration = symbol.valueDeclaration; - } else if (symbol.declarations.length > 0) { + } else if (symbol.declarations !== undefined && symbol.declarations.length > 0) { valueDeclaration = symbol.declarations[0]; } if (valueDeclaration !== undefined && ts.isShorthandPropertyAssignment(valueDeclaration)) {