File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
139139 let exportEquals : ExportAssignment ;
140140 let hasExportStars : boolean ;
141141
142- /** write emitted output to disk*/
142+ /** Write emitted output to disk */
143143 let writeEmittedFiles = writeJavaScriptFile ;
144144
145145 let detachedCommentsInfo : { nodePos : number ; detachedCommentEndPos : number } [ ] ;
@@ -3055,13 +3055,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
30553055 }
30563056
30573057 function emitVariableStatement ( node : VariableStatement ) {
3058- let startIsEmitted = true ;
3059- if ( ! ( node . flags & NodeFlags . Export ) ) {
3060- startIsEmitted = tryEmitStartOfVariableDeclarationList ( node . declarationList ) ;
3058+ let startIsEmitted = false ;
3059+ if ( node . flags & NodeFlags . Export ) {
3060+ if ( isES6ExportedDeclaration ( node ) ) {
3061+ // Exported ES6 module member
3062+ write ( "export " ) ;
3063+ startIsEmitted = tryEmitStartOfVariableDeclarationList ( node . declarationList ) ;
3064+ }
30613065 }
3062- else if ( isES6ExportedDeclaration ( node ) ) {
3063- // Exported ES6 module member
3064- write ( "export " ) ;
3066+ else {
30653067 startIsEmitted = tryEmitStartOfVariableDeclarationList ( node . declarationList ) ;
30663068 }
30673069 if ( startIsEmitted ) {
You can’t perform that action at this time.
0 commit comments