From 7d067890ce808fd57439d4cf9f6aec40d3e5c412 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 30 Sep 2015 14:46:33 -0700 Subject: [PATCH] naive change --- src/compiler/emitter.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index bec17b813cb..60864e411fc 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -469,6 +469,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (!isExternalModuleOrDeclarationFile(sourceFile)) { emitSourceFile(sourceFile); } + else if (isExternalModule(sourceFile)) { + emitConcatenatedModule(sourceFile); + } }); } @@ -482,6 +485,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emit(sourceFile); } + function emitConcatenatedModule(sourceFile: SourceFile): void { + currentSourceFile = sourceFile; + exportFunctionForFile = undefined; + moduleEmitDelegates[modulekind](sourceFile, 0); + } + function isUniqueName(name: string): boolean { return !resolver.hasGlobalName(name) && !hasProperty(currentSourceFile.identifiers, name) &&