@@ -554,6 +554,7 @@ namespace ts {
554554 createVariableDeclarationList ( [
555555 createVariableDeclaration (
556556 getDeclarationName ( node , /*allowComments*/ true ) ,
557+ /*type*/ undefined ,
557558 transformClassLikeDeclarationToExpression ( node )
558559 )
559560 ] ) ,
@@ -621,7 +622,9 @@ namespace ts {
621622 const classFunction = createFunctionExpression (
622623 /*asteriskToken*/ undefined ,
623624 /*name*/ undefined ,
625+ /*typeParameters*/ undefined ,
624626 extendsClauseElement ? [ createParameter ( "_super" ) ] : [ ] ,
627+ /*type*/ undefined ,
625628 transformClassBody ( node , extendsClauseElement )
626629 ) ;
627630
@@ -645,6 +648,7 @@ namespace ts {
645648 return createParen (
646649 createCall (
647650 outer ,
651+ /*typeArguments*/ undefined ,
648652 extendsClauseElement
649653 ? [ visitNode ( extendsClauseElement . expression , visitor , isExpression ) ]
650654 : [ ]
@@ -717,10 +721,13 @@ namespace ts {
717721 const hasSynthesizedSuper = hasSynthesizedDefaultSuperCall ( constructor , extendsClauseElement !== undefined ) ;
718722 statements . push (
719723 createFunctionDeclaration (
724+ /*decorators*/ undefined ,
720725 /*modifiers*/ undefined ,
721726 /*asteriskToken*/ undefined ,
722727 getDeclarationName ( node ) ,
728+ /*typeParameters*/ undefined ,
723729 transformConstructorParameters ( constructor , hasSynthesizedSuper ) ,
730+ /*type*/ undefined ,
724731 transformConstructorBody ( constructor , node , extendsClauseElement , hasSynthesizedSuper ) ,
725732 /*location*/ constructor || node
726733 )
@@ -967,10 +974,9 @@ namespace ts {
967974 NodeEmitFlags . SingleLine | NodeEmitFlags . NoTrailingSourceMap | NodeEmitFlags . NoTokenSourceMaps
968975 ) ,
969976 /*elseStatement*/ undefined ,
970- /*location*/ parameter ,
971- { startOnNewLine : true }
977+ /*location*/ parameter
972978 ) ;
973-
979+ statement . startsOnNewLine = true ;
974980 setNodeEmitFlags ( statement , NodeEmitFlags . NoTokenSourceMaps | NodeEmitFlags . NoTrailingSourceMap ) ;
975981 statements . push ( statement ) ;
976982 }
@@ -1018,6 +1024,7 @@ namespace ts {
10181024 createVariableDeclarationList ( [
10191025 createVariableDeclaration (
10201026 declarationName ,
1027+ /*type*/ undefined ,
10211028 createArrayLiteral ( [ ] )
10221029 )
10231030 ] ) ,
@@ -1030,7 +1037,7 @@ namespace ts {
10301037 // }
10311038 const forStatement = createFor (
10321039 createVariableDeclarationList ( [
1033- createVariableDeclaration ( temp , createLiteral ( restIndex ) )
1040+ createVariableDeclaration ( temp , /*type*/ undefined , createLiteral ( restIndex ) )
10341041 ] , /*location*/ parameter ) ,
10351042 createLessThan (
10361043 temp ,
@@ -1073,6 +1080,7 @@ namespace ts {
10731080 createVariableDeclarationList ( [
10741081 createVariableDeclaration (
10751082 "_this" ,
1083+ /*type*/ undefined ,
10761084 createThis ( )
10771085 )
10781086 ] )
@@ -1228,6 +1236,7 @@ namespace ts {
12281236
12291237 return createCall (
12301238 createPropertyAccess ( createIdentifier ( "Object" ) , "defineProperty" ) ,
1239+ /*typeArguments*/ undefined ,
12311240 [
12321241 target ,
12331242 propertyName ,
@@ -1271,15 +1280,19 @@ namespace ts {
12711280 * @param node a FunctionDeclaration node.
12721281 */
12731282 function visitFunctionDeclaration ( node : FunctionDeclaration ) : FunctionDeclaration {
1274- return createFunctionDeclaration (
1275- /*modifiers*/ undefined ,
1276- node . asteriskToken ,
1277- node . name ,
1278- visitNodes ( node . parameters , visitor , isParameter ) ,
1279- transformFunctionBody ( node ) ,
1280- /*location*/ node ,
1281- /*original*/ node
1282- ) ;
1283+ return setOriginalNode (
1284+ createFunctionDeclaration (
1285+ /*decorators*/ undefined ,
1286+ /*modifiers*/ undefined ,
1287+ node . asteriskToken ,
1288+ node . name ,
1289+ /*typeParameters*/ undefined ,
1290+ visitNodes ( node . parameters , visitor , isParameter ) ,
1291+ /*type*/ undefined ,
1292+ transformFunctionBody ( node ) ,
1293+ /*location*/ node
1294+ ) ,
1295+ /*original*/ node ) ;
12831296 }
12841297
12851298 /**
@@ -1295,12 +1308,16 @@ namespace ts {
12951308 containingNonArrowFunction = node ;
12961309 }
12971310
1298- const expression = createFunctionExpression (
1299- node . asteriskToken ,
1300- name ,
1301- visitNodes ( node . parameters , visitor , isParameter ) ,
1302- saveStateAndInvoke ( node , transformFunctionBody ) ,
1303- location ,
1311+ const expression = setOriginalNode (
1312+ createFunctionExpression (
1313+ node . asteriskToken ,
1314+ name ,
1315+ /*typeParameters*/ undefined ,
1316+ visitNodes ( node . parameters , visitor , isParameter ) ,
1317+ /*type*/ undefined ,
1318+ saveStateAndInvoke ( node , transformFunctionBody ) ,
1319+ location
1320+ ) ,
13041321 /*original*/ node
13051322 ) ;
13061323
@@ -1755,6 +1772,7 @@ namespace ts {
17551772 createVariableDeclarationList ( [
17561773 createVariableDeclaration (
17571774 firstOriginalDeclaration ? firstOriginalDeclaration . name : createTempVariable ( /*recordTempVariable*/ undefined ) ,
1775+ /*type*/ undefined ,
17581776 createElementAccess ( rhsReference , counter )
17591777 )
17601778 ] , /*location*/ moveRangePos ( initializer , - 1 ) ) ,
@@ -1818,8 +1836,8 @@ namespace ts {
18181836
18191837 const forStatement = createFor (
18201838 createVariableDeclarationList ( [
1821- createVariableDeclaration ( counter , createLiteral ( 0 ) , /*location*/ moveRangePos ( node . expression , - 1 ) ) ,
1822- createVariableDeclaration ( rhsReference , expression , /*location*/ node . expression )
1839+ createVariableDeclaration ( counter , /*type*/ undefined , createLiteral ( 0 ) , /*location*/ moveRangePos ( node . expression , - 1 ) ) ,
1840+ createVariableDeclaration ( rhsReference , /*type*/ undefined , expression , /*location*/ node . expression )
18231841 ] , /*location*/ node . expression ) ,
18241842 createLessThan (
18251843 counter ,
@@ -1996,11 +2014,14 @@ namespace ts {
19962014 [
19972015 createVariableDeclaration (
19982016 functionName ,
2017+ /*type*/ undefined ,
19992018 setNodeEmitFlags (
20002019 createFunctionExpression (
20012020 /*asteriskToken*/ undefined ,
20022021 /*name*/ undefined ,
2022+ /*typeParameters*/ undefined ,
20032023 loopParameters ,
2024+ /*type*/ undefined ,
20042025 < Block > loopBody
20052026 ) ,
20062027 currentState . containsLexicalThis
@@ -2027,6 +2048,7 @@ namespace ts {
20272048 ( extraVariableDeclarations || ( extraVariableDeclarations = [ ] ) ) . push (
20282049 createVariableDeclaration (
20292050 currentState . argumentsName ,
2051+ /*type*/ undefined ,
20302052 createIdentifier ( "arguments" )
20312053 )
20322054 ) ;
@@ -2047,8 +2069,9 @@ namespace ts {
20472069 ( extraVariableDeclarations || ( extraVariableDeclarations = [ ] ) ) . push (
20482070 createVariableDeclaration (
20492071 currentState . thisName ,
2072+ /*type*/ undefined ,
20502073 createIdentifier ( "this" )
2051- )
2074+ )
20522075 ) ;
20532076 }
20542077 }
@@ -2140,7 +2163,7 @@ namespace ts {
21402163 ! state . labeledNonLocalBreaks &&
21412164 ! state . labeledNonLocalContinues ;
21422165
2143- const call = createCall ( loopFunctionExpressionName , map ( parameters , p => < Identifier > p . name ) ) ;
2166+ const call = createCall ( loopFunctionExpressionName , /*typeArguments*/ undefined , map ( parameters , p => < Identifier > p . name ) ) ;
21442167 if ( isSimpleLoop ) {
21452168 statements . push ( createStatement ( call ) ) ;
21462169 copyOutParameters ( state . loopOutParameters , CopyDirection . ToOriginal , statements ) ;
@@ -2150,7 +2173,7 @@ namespace ts {
21502173 const stateVariable = createVariableStatement (
21512174 /*modifiers*/ undefined ,
21522175 createVariableDeclarationList (
2153- [ createVariableDeclaration ( loopResultName , call ) ]
2176+ [ createVariableDeclaration ( loopResultName , /*type*/ undefined , call ) ]
21542177 )
21552178 ) ;
21562179 statements . push ( stateVariable ) ;
@@ -2474,6 +2497,7 @@ namespace ts {
24742497 thisArg ,
24752498 transformAndSpreadElements ( createNodeArray ( [ createVoidZero ( ) , ...node . arguments ] ) , /*needsUniqueCopy*/ false , /*multiLine*/ false , /*hasTrailingComma*/ false )
24762499 ) ,
2500+ /*typeArguments*/ undefined ,
24772501 [ ]
24782502 ) ;
24792503 }
@@ -2586,7 +2610,7 @@ namespace ts {
25862610 inlineExpressions ( [
25872611 createAssignment ( temp , createArrayLiteral ( cookedStrings ) ) ,
25882612 createAssignment ( createPropertyAccess ( temp , "raw" ) , createArrayLiteral ( rawStrings ) ) ,
2589- createCall ( tag , templateArguments )
2613+ createCall ( tag , /*typeArguments*/ undefined , templateArguments )
25902614 ] )
25912615 ) ;
25922616 }
0 commit comments