Skip to content

Commit 4fed0bd

Browse files
authored
fix: Module declaration parsed as namespace (#1301)
Closes #1284
1 parent f93c76b commit 4fed0bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/converter/nodes/module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export class ModuleConverter extends ConverterNodeComponent<ts.ModuleDeclaration
2424
convert(context: Context, node: ts.ModuleDeclaration): Reflection | undefined {
2525
const reflection = context.isInherit && context.inheritParent === node
2626
? <DeclarationReflection> context.scope
27-
: createDeclaration(context, node, ReflectionKind.Namespace);
27+
: createDeclaration(context, node, node.name.kind === ts.SyntaxKind.StringLiteral
28+
? ReflectionKind.Module
29+
: ReflectionKind.Namespace);
2830
context.withScope(reflection, () => {
2931
if (node.body) {
3032
this.owner.convertNode(context, node.body);

0 commit comments

Comments
 (0)