mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Emit export class declaration in es6 format.
Note since we havent yet changed the emitting of class declaration to es6 format, we are just exporting the constructor function Conflicts: src/compiler/emitter.ts
This commit is contained in:
@@ -4748,7 +4748,12 @@ module ts {
|
||||
}
|
||||
write(");");
|
||||
emitEnd(node);
|
||||
if (node.flags & NodeFlags.Export && !(node.flags & NodeFlags.Default)) {
|
||||
|
||||
if (isES6ModuleMemberDeclaration(node)) {
|
||||
// TODO update this to emit "export class " when ES67 class emit is available
|
||||
emitES6NamedExportForDeclaration(node);
|
||||
}
|
||||
else if (node.flags & NodeFlags.Export && !(node.flags & NodeFlags.Default)) {
|
||||
writeLine();
|
||||
emitStart(node);
|
||||
emitModuleMemberName(node);
|
||||
@@ -4757,6 +4762,7 @@ module ts {
|
||||
emitEnd(node);
|
||||
write(";");
|
||||
}
|
||||
|
||||
if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile && node.name) {
|
||||
emitExportMemberAssignments(node.name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user