diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7cfe69c5620..0bd57740803 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10982,6 +10982,8 @@ module ts { function getExportNameSubstitution(symbol: Symbol, location: Node): string { if (isExternalModuleSymbol(symbol.parent)) { var symbolName = unescapeIdentifier(symbol.name); + // If this is es6 or higher, just use the name of the export + // no need to qualify it. if (languageVersion >= ScriptTarget.ES6) { return symbolName; } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 42856a57077..126ac7a4e69 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4903,6 +4903,7 @@ module ts { } write("class "); + // check if this is an "export default class" as it may not have a name if (node.name || !(node.flags & NodeFlags.Default)) { emitDeclarationName(node); }