mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-13 11:46:08 -05:00
Es6 module emit for export VarDeclaration, export LexicalDeclaration
Conflicts: src/compiler/emitter.ts tests/baselines/reference/es6ExportAll.js tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js tests/baselines/reference/es6ImportNamedImport.js
This commit is contained in:
committed by
Mohamed Hegazy
parent
29b221430f
commit
05932fdddf
@@ -4202,6 +4202,11 @@ module ts {
|
||||
if (!(node.flags & NodeFlags.Export)) {
|
||||
emitStartOfVariableDeclarationList(node.declarationList);
|
||||
}
|
||||
else if (languageVersion >= ScriptTarget.ES6 && node.parent.kind === SyntaxKind.SourceFile) {
|
||||
// Exported ES6 module member
|
||||
write("export ");
|
||||
emitStartOfVariableDeclarationList(node.declarationList);
|
||||
}
|
||||
emitCommaList(node.declarationList.declarations);
|
||||
write(";");
|
||||
if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile) {
|
||||
|
||||
Reference in New Issue
Block a user