From 71d838ad32c90831ee7ab32c6e9de74da0c2ebf0 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 28 Aug 2020 11:14:48 -0600 Subject: [PATCH] fix: Check for missing declarations Closes #1329 --- src/lib/converter/factories/reference.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/converter/factories/reference.ts b/src/lib/converter/factories/reference.ts index a64b40d40..98dab29e1 100644 --- a/src/lib/converter/factories/reference.ts +++ b/src/lib/converter/factories/reference.ts @@ -35,7 +35,8 @@ export function createReferenceReflection(context: Context, source: ts.Symbol, t // If any declaration is outside, the symbol should be considered outside. Some declarations may // be inside due to declaration merging. - if (target.declarations.some(d => context.isOutsideDocumentation(d.getSourceFile().fileName))) { + const declarations = target.getDeclarations(); + if (!declarations || declarations.some(d => context.isOutsideDocumentation(d.getSourceFile().fileName))) { return; }