From 4a803328efab8a98468d2de441e0a80ce935454c Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 23 Dec 2020 20:39:19 +0100 Subject: [PATCH] Fix assertion on exported interfaces --- src/compiler.ts | 2 ++ tests/compiler/exports.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/compiler.ts b/src/compiler.ts index 08d25afff7..9d8bd7838d 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -838,6 +838,7 @@ export class Compiler extends DiagnosticEmitter { // just traverse members below case ElementKind.ENUM: + case ElementKind.INTERFACE_PROTOTYPE: case ElementKind.NAMESPACE: case ElementKind.TYPEDEFINITION: case ElementKind.INDEXSIGNATURE: break; @@ -907,6 +908,7 @@ export class Compiler extends DiagnosticEmitter { if (propertyInstance) this.compileProperty(propertyInstance); break; } + case ElementKind.INTERFACE_PROTOTYPE: case ElementKind.NAMESPACE: case ElementKind.TYPEDEFINITION: case ElementKind.ENUMVALUE: diff --git a/tests/compiler/exports.ts b/tests/compiler/exports.ts index c18fc6a1fa..c79d484347 100644 --- a/tests/compiler/exports.ts +++ b/tests/compiler/exports.ts @@ -58,3 +58,9 @@ export namespace outer { } export {renamed_mul} from "./export"; + +// interfaces (should not error) +export interface Iface {} +export namespace outer { + export interface Iface {} +}