Skip to content

Commit

Permalink
fix: Missing exported members in file-as-namespace reflection
Browse files Browse the repository at this point in the history
Resolves #1493
  • Loading branch information
Gerrit0 committed Feb 5, 2021
1 parent 855bf6f commit 1423960
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/converter/symbols.ts
Expand Up @@ -177,7 +177,12 @@ function convertNamespace(
let exportFlags = ts.SymbolFlags.ModuleMember;

// This can happen in JS land where "class" functions get tagged as a namespace too
if (symbol.getDeclarations()?.some(ts.isModuleDeclaration) !== true) {
if (
symbol
.getDeclarations()
?.some((d) => ts.isModuleDeclaration(d) || ts.isSourceFile(d)) !==
true
) {
exportFlags = ts.SymbolFlags.ClassMember;

if (hasAnyFlag(symbol.flags, ts.SymbolFlags.Class)) {
Expand Down

0 comments on commit 1423960

Please sign in to comment.