Skip to content

Commit

Permalink
fix: Module declaration parsed as namespace (#1301)
Browse files Browse the repository at this point in the history
Closes #1284
  • Loading branch information
Unnvaldr committed May 15, 2020
1 parent f93c76b commit 4fed0bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/converter/nodes/module.ts
Expand Up @@ -24,7 +24,9 @@ export class ModuleConverter extends ConverterNodeComponent<ts.ModuleDeclaration
convert(context: Context, node: ts.ModuleDeclaration): Reflection | undefined {
const reflection = context.isInherit && context.inheritParent === node
? <DeclarationReflection> context.scope
: createDeclaration(context, node, ReflectionKind.Namespace);
: createDeclaration(context, node, node.name.kind === ts.SyntaxKind.StringLiteral
? ReflectionKind.Module
: ReflectionKind.Namespace);
context.withScope(reflection, () => {
if (node.body) {
this.owner.convertNode(context, node.body);
Expand Down

0 comments on commit 4fed0bd

Please sign in to comment.