@@ -4706,14 +4706,11 @@ module ts {
4706
4706
}
4707
4707
4708
4708
function emitMemberFunctionsForES6AndHigher ( node : ClassDeclaration ) {
4709
- forEach ( node . members , member => {
4710
- if ( member . kind === SyntaxKind . MethodDeclaration || node . kind === SyntaxKind . MethodSignature ) {
4711
- if ( ! ( < MethodDeclaration > member ) . body ) {
4712
- return emitPinnedOrTripleSlashComments ( member ) ;
4713
- }
4714
-
4709
+ for ( let member of node . members ) {
4710
+ if ( ( member . kind === SyntaxKind . MethodDeclaration || node . kind === SyntaxKind . MethodSignature ) && ! ( < MethodDeclaration > member ) . body ) {
4711
+ emitPinnedOrTripleSlashComments ( member ) ;
4715
4712
}
4716
- if ( member . kind === SyntaxKind . MethodDeclaration || node . kind === SyntaxKind . MethodSignature || member . kind === SyntaxKind . GetAccessor || member . kind === SyntaxKind . SetAccessor ) {
4713
+ else if ( member . kind === SyntaxKind . MethodDeclaration || node . kind === SyntaxKind . MethodSignature || member . kind === SyntaxKind . GetAccessor || member . kind === SyntaxKind . SetAccessor ) {
4717
4714
writeLine ( ) ;
4718
4715
emitLeadingComments ( member ) ;
4719
4716
emitStart ( member ) ;
@@ -4732,7 +4729,7 @@ module ts {
4732
4729
emitEnd ( member ) ;
4733
4730
emitTrailingComments ( member ) ;
4734
4731
}
4735
- } ) ;
4732
+ }
4736
4733
}
4737
4734
4738
4735
function emitConstructor ( node : ClassDeclaration , baseTypeNode : TypeReferenceNode ) {
@@ -4822,7 +4819,12 @@ module ts {
4822
4819
if ( baseTypeNode ) {
4823
4820
writeLine ( ) ;
4824
4821
emitStart ( baseTypeNode ) ;
4825
- languageVersion < ScriptTarget . ES6 ? write ( "_super.apply(this, arguments);" ) : write ( "super(...args);" ) ;
4822
+ if ( languageVersion < ScriptTarget . ES6 ) {
4823
+ write ( "_super.apply(this, arguments);" ) ;
4824
+ }
4825
+ else {
4826
+ write ( "super(...args);" ) ;
4827
+ }
4826
4828
emitEnd ( baseTypeNode ) ;
4827
4829
}
4828
4830
}
0 commit comments