@@ -1919,6 +1919,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19191919
19201920 if ( multiLine ) {
19211921 decreaseIndent ( ) ;
1922+ if ( ! compilerOptions . transformCompatibleEmit ) {
1923+ writeLine ( ) ;
1924+ }
19221925 }
19231926
19241927 write ( ")" ) ;
@@ -4335,7 +4338,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43354338 writeLine ( ) ;
43364339 emitStart ( restParam ) ;
43374340 emitNodeWithCommentsAndWithoutSourcemap ( restParam . name ) ;
4338- write ( restIndex > 0
4341+ write ( restIndex > 0 || ! compilerOptions . transformCompatibleEmit
43394342 ? `[${ tempName } - ${ restIndex } ] = arguments[${ tempName } ];`
43404343 : `[${ tempName } ] = arguments[${ tempName } ];` ) ;
43414344 emitEnd ( restParam ) ;
@@ -5357,7 +5360,7 @@ const _super = (function (geti, seti) {
53575360 const isClassExpressionWithStaticProperties = staticProperties . length > 0 && node . kind === SyntaxKind . ClassExpression ;
53585361 let tempVariable : Identifier ;
53595362
5360- if ( isClassExpressionWithStaticProperties ) {
5363+ if ( isClassExpressionWithStaticProperties && compilerOptions . transformCompatibleEmit ) {
53615364 tempVariable = createAndRecordTempVariable ( TempFlags . Auto ) ;
53625365 write ( "(" ) ;
53635366 increaseIndent ( ) ;
@@ -5394,6 +5397,11 @@ const _super = (function (geti, seti) {
53945397 writeLine ( ) ;
53955398 emitConstructor ( node , baseTypeNode ) ;
53965399 emitMemberFunctionsForES5AndLower ( node ) ;
5400+ if ( ! compilerOptions . transformCompatibleEmit ) {
5401+ emitPropertyDeclarations ( node , staticProperties ) ;
5402+ writeLine ( ) ;
5403+ emitDecoratorsOfClass ( node , /*decoratedClassAlias*/ undefined ) ;
5404+ }
53975405 writeLine ( ) ;
53985406 emitToken ( SyntaxKind . CloseBraceToken , node . members . end , ( ) => {
53995407 write ( "return " ) ;
@@ -5420,11 +5428,13 @@ const _super = (function (geti, seti) {
54205428 write ( "))" ) ;
54215429 if ( node . kind === SyntaxKind . ClassDeclaration ) {
54225430 write ( ";" ) ;
5423- emitPropertyDeclarations ( node , staticProperties ) ;
5424- writeLine ( ) ;
5425- emitDecoratorsOfClass ( node , /*decoratedClassAlias*/ undefined ) ;
5431+ if ( compilerOptions . transformCompatibleEmit ) {
5432+ emitPropertyDeclarations ( node , staticProperties ) ;
5433+ writeLine ( ) ;
5434+ emitDecoratorsOfClass ( node , /*decoratedClassAlias*/ undefined ) ;
5435+ }
54265436 }
5427- else if ( isClassExpressionWithStaticProperties ) {
5437+ else if ( isClassExpressionWithStaticProperties && compilerOptions . transformCompatibleEmit ) {
54285438 for ( const property of staticProperties ) {
54295439 write ( "," ) ;
54305440 writeLine ( ) ;
0 commit comments