Skip to content

Commit 5eb104b

Browse files
committed
Tidy up symbol.declarations check
1 parent be929bb commit 5eb104b

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

src/lib/converter/nodes/export.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,21 @@ export class ExportConverter extends ConverterNodeComponent<ts.ExportAssignment>
2525
}
2626
if (symbol && symbol.declarations) {
2727
const project = context.project;
28-
// if the symbol declarations are undefined due to an export, we skip it
29-
// fixes https://github.com/TypeStrong/typedoc/issues/513
30-
if (symbol.declarations) {
31-
symbol.declarations.forEach((declaration) => {
32-
if (!declaration.symbol) {
33-
return;
34-
}
35-
const id = project.symbolMapping[context.getSymbolID(declaration.symbol)];
36-
if (!id) {
37-
return;
38-
}
39-
40-
const reflection = project.reflections[id];
41-
if (node.isExportEquals && reflection instanceof DeclarationReflection) {
42-
(<DeclarationReflection> reflection).setFlag(ReflectionFlag.ExportAssignment, true);
43-
}
44-
markAsExported(reflection);
45-
});
46-
}
28+
symbol.declarations.forEach((declaration) => {
29+
if (!declaration.symbol) {
30+
return;
31+
}
32+
const id = project.symbolMapping[context.getSymbolID(declaration.symbol)];
33+
if (!id) {
34+
return;
35+
}
36+
37+
const reflection = project.reflections[id];
38+
if (node.isExportEquals && reflection instanceof DeclarationReflection) {
39+
(<DeclarationReflection> reflection).setFlag(ReflectionFlag.ExportAssignment, true);
40+
}
41+
markAsExported(reflection);
42+
});
4743
}
4844

4945
function markAsExported(reflection: Reflection) {

0 commit comments

Comments
 (0)