From 5873f527b4c25d3e14b4c80e877b9326233efd97 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 3 Apr 2022 12:12:37 -0600 Subject: [PATCH] Add a test/fix for another edge case --- src/lib/converter/converter.ts | 5 ++++- src/test/converter2/issues/gh1903b.ts | 2 ++ src/test/issueTests.ts | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/test/converter2/issues/gh1903b.ts diff --git a/src/lib/converter/converter.ts b/src/lib/converter/converter.ts index a2e154e11..04f3d96c1 100644 --- a/src/lib/converter/converter.ts +++ b/src/lib/converter/converter.ts @@ -189,7 +189,10 @@ export class Converter extends ChildableComponent< ts.SyntaxKind.PropertyAssignment, ts.SyntaxKind.PropertySignature, ], - [ReflectionKind.Variable]: [ts.SyntaxKind.VariableDeclaration], + [ReflectionKind.Variable]: [ + ts.SyntaxKind.VariableDeclaration, + ts.SyntaxKind.ExportAssignment, + ], [ReflectionKind.Function]: [ ts.SyntaxKind.FunctionDeclaration, ts.SyntaxKind.VariableDeclaration, diff --git a/src/test/converter2/issues/gh1903b.ts b/src/test/converter2/issues/gh1903b.ts new file mode 100644 index 000000000..9759ffb9e --- /dev/null +++ b/src/test/converter2/issues/gh1903b.ts @@ -0,0 +1,2 @@ +/** @hidden */ +export default 123; diff --git a/src/test/issueTests.ts b/src/test/issueTests.ts index 86e0f5e1d..0d63f726c 100644 --- a/src/test/issueTests.ts +++ b/src/test/issueTests.ts @@ -363,4 +363,11 @@ export const issueTests: { ["typedoc"] ); }, + + gh1903b(project) { + equal( + Object.values(project.reflections).map((r) => r.name), + ["typedoc"] + ); + }, };