@@ -592,15 +592,15 @@ namespace ts {
592592 : node ;
593593 }
594594
595- export function createCallSignature ( typeParameters : TypeParameterDeclaration [ ] | undefined , parameters : ParameterDeclaration [ ] , type : TypeNode | undefined ) {
595+ export function createCallSignature ( typeParameters : ReadonlyArray < TypeParameterDeclaration > | undefined , parameters : ReadonlyArray < ParameterDeclaration > , type : TypeNode | undefined ) {
596596 return createSignatureDeclaration ( SyntaxKind . CallSignature , typeParameters , parameters , type ) as CallSignatureDeclaration ;
597597 }
598598
599599 export function updateCallSignature ( node : CallSignatureDeclaration , typeParameters : NodeArray < TypeParameterDeclaration > | undefined , parameters : NodeArray < ParameterDeclaration > , type : TypeNode | undefined ) {
600600 return updateSignatureDeclaration ( node , typeParameters , parameters , type ) ;
601601 }
602602
603- export function createConstructSignature ( typeParameters : TypeParameterDeclaration [ ] | undefined , parameters : ParameterDeclaration [ ] , type : TypeNode | undefined ) {
603+ export function createConstructSignature ( typeParameters : ReadonlyArray < TypeParameterDeclaration > | undefined , parameters : ReadonlyArray < ParameterDeclaration > , type : TypeNode | undefined ) {
604604 return createSignatureDeclaration ( SyntaxKind . ConstructSignature , typeParameters , parameters , type ) as ConstructSignatureDeclaration ;
605605 }
606606
@@ -636,7 +636,7 @@ namespace ts {
636636 }
637637
638638 /* @internal */
639- export function createSignatureDeclaration ( kind : SyntaxKind , typeParameters : ReadonlyArray < TypeParameterDeclaration > | undefined , parameters : ReadonlyArray < ParameterDeclaration > , type : TypeNode | undefined , typeArguments ?: TypeNode [ ] | undefined ) {
639+ export function createSignatureDeclaration ( kind : SyntaxKind , typeParameters : ReadonlyArray < TypeParameterDeclaration > | undefined , parameters : ReadonlyArray < ParameterDeclaration > , type : TypeNode | undefined , typeArguments ?: ReadonlyArray < TypeNode > | undefined ) {
640640 const node = createSynthesizedNode ( kind ) as SignatureDeclaration ;
641641 node . typeParameters = asNodeArray ( typeParameters ) ;
642642 node . parameters = asNodeArray ( parameters ) ;
@@ -687,15 +687,15 @@ namespace ts {
687687 : node ;
688688 }
689689
690- export function createFunctionTypeNode ( typeParameters : TypeParameterDeclaration [ ] | undefined , parameters : ParameterDeclaration [ ] , type : TypeNode | undefined ) {
690+ export function createFunctionTypeNode ( typeParameters : ReadonlyArray < TypeParameterDeclaration > | undefined , parameters : ReadonlyArray < ParameterDeclaration > , type : TypeNode | undefined ) {
691691 return createSignatureDeclaration ( SyntaxKind . FunctionType , typeParameters , parameters , type ) as FunctionTypeNode ;
692692 }
693693
694694 export function updateFunctionTypeNode ( node : FunctionTypeNode , typeParameters : NodeArray < TypeParameterDeclaration > | undefined , parameters : NodeArray < ParameterDeclaration > , type : TypeNode | undefined ) {
695695 return updateSignatureDeclaration ( node , typeParameters , parameters , type ) ;
696696 }
697697
698- export function createConstructorTypeNode ( typeParameters : TypeParameterDeclaration [ ] | undefined , parameters : ParameterDeclaration [ ] , type : TypeNode | undefined ) {
698+ export function createConstructorTypeNode ( typeParameters : ReadonlyArray < TypeParameterDeclaration > | undefined , parameters : ReadonlyArray < ParameterDeclaration > , type : TypeNode | undefined ) {
699699 return createSignatureDeclaration ( SyntaxKind . ConstructorType , typeParameters , parameters , type ) as ConstructorTypeNode ;
700700 }
701701
@@ -751,15 +751,15 @@ namespace ts {
751751 : node ;
752752 }
753753
754- export function createUnionTypeNode ( types : TypeNode [ ] ) : UnionTypeNode {
754+ export function createUnionTypeNode ( types : ReadonlyArray < TypeNode > ) : UnionTypeNode {
755755 return < UnionTypeNode > createUnionOrIntersectionTypeNode ( SyntaxKind . UnionType , types ) ;
756756 }
757757
758758 export function updateUnionTypeNode ( node : UnionTypeNode , types : NodeArray < TypeNode > ) {
759759 return updateUnionOrIntersectionTypeNode ( node , types ) ;
760760 }
761761
762- export function createIntersectionTypeNode ( types : TypeNode [ ] ) : IntersectionTypeNode {
762+ export function createIntersectionTypeNode ( types : ReadonlyArray < TypeNode > ) : IntersectionTypeNode {
763763 return < IntersectionTypeNode > createUnionOrIntersectionTypeNode ( SyntaxKind . IntersectionType , types ) ;
764764 }
765765
@@ -2572,9 +2572,9 @@ namespace ts {
25722572
25732573 // Compound nodes
25742574
2575- export function createImmediatelyInvokedFunctionExpression ( statements : Statement [ ] ) : CallExpression ;
2576- export function createImmediatelyInvokedFunctionExpression ( statements : Statement [ ] , param : ParameterDeclaration , paramValue : Expression ) : CallExpression ;
2577- export function createImmediatelyInvokedFunctionExpression ( statements : Statement [ ] , param ?: ParameterDeclaration , paramValue ?: Expression ) {
2575+ export function createImmediatelyInvokedFunctionExpression ( statements : ReadonlyArray < Statement > ) : CallExpression ;
2576+ export function createImmediatelyInvokedFunctionExpression ( statements : ReadonlyArray < Statement > , param : ParameterDeclaration , paramValue : Expression ) : CallExpression ;
2577+ export function createImmediatelyInvokedFunctionExpression ( statements : ReadonlyArray < Statement > , param ?: ParameterDeclaration , paramValue ?: Expression ) {
25782578 return createCall (
25792579 createFunctionExpression (
25802580 /*modifiers*/ undefined ,
@@ -2590,9 +2590,9 @@ namespace ts {
25902590 ) ;
25912591 }
25922592
2593- export function createImmediatelyInvokedArrowFunction ( statements : Statement [ ] ) : CallExpression ;
2594- export function createImmediatelyInvokedArrowFunction ( statements : Statement [ ] , param : ParameterDeclaration , paramValue : Expression ) : CallExpression ;
2595- export function createImmediatelyInvokedArrowFunction ( statements : Statement [ ] , param ?: ParameterDeclaration , paramValue ?: Expression ) {
2593+ export function createImmediatelyInvokedArrowFunction ( statements : ReadonlyArray < Statement > ) : CallExpression ;
2594+ export function createImmediatelyInvokedArrowFunction ( statements : ReadonlyArray < Statement > , param : ParameterDeclaration , paramValue : Expression ) : CallExpression ;
2595+ export function createImmediatelyInvokedArrowFunction ( statements : ReadonlyArray < Statement > , param ?: ParameterDeclaration , paramValue ?: Expression ) {
25962596 return createCall (
25972597 createArrowFunction (
25982598 /*modifiers*/ undefined ,
@@ -3093,7 +3093,7 @@ namespace ts {
30933093 return createCall ( createPropertyAccess ( array , "slice" ) , /*typeArguments*/ undefined , argumentsList ) ;
30943094 }
30953095
3096- export function createArrayConcat ( array : Expression , values : Expression [ ] ) {
3096+ export function createArrayConcat ( array : Expression , values : ReadonlyArray < Expression > ) {
30973097 return createCall (
30983098 createPropertyAccess ( array , "concat" ) ,
30993099 /*typeArguments*/ undefined ,
@@ -3145,7 +3145,7 @@ namespace ts {
31453145 ) ;
31463146 }
31473147
3148- export function createExpressionForJsxElement ( jsxFactoryEntity : EntityName , reactNamespace : string , tagName : Expression , props : Expression , children : Expression [ ] , parentElement : JsxOpeningLikeElement , location : TextRange ) : LeftHandSideExpression {
3148+ export function createExpressionForJsxElement ( jsxFactoryEntity : EntityName , reactNamespace : string , tagName : Expression , props : Expression , children : ReadonlyArray < Expression > , parentElement : JsxOpeningLikeElement , location : TextRange ) : LeftHandSideExpression {
31493149 const argumentsList = [ tagName ] ;
31503150 if ( props ) {
31513151 argumentsList . push ( props ) ;
@@ -3177,7 +3177,7 @@ namespace ts {
31773177 ) ;
31783178 }
31793179
3180- export function createExpressionForJsxFragment ( jsxFactoryEntity : EntityName , reactNamespace : string , children : Expression [ ] , parentElement : JsxOpeningFragment , location : TextRange ) : LeftHandSideExpression {
3180+ export function createExpressionForJsxFragment ( jsxFactoryEntity : EntityName , reactNamespace : string , children : ReadonlyArray < Expression > , parentElement : JsxOpeningFragment , location : TextRange ) : LeftHandSideExpression {
31813181 const tagName = createPropertyAccess (
31823182 createReactNamespace ( reactNamespace , parentElement ) ,
31833183 "Fragment"
@@ -3288,7 +3288,7 @@ namespace ts {
32883288 };`
32893289 } ;
32903290
3291- export function createSpreadHelper ( context : TransformationContext , argumentList : Expression [ ] , location ?: TextRange ) {
3291+ export function createSpreadHelper ( context : TransformationContext , argumentList : ReadonlyArray < Expression > , location ?: TextRange ) {
32923292 context . requestEmitHelper ( readHelper ) ;
32933293 context . requestEmitHelper ( spreadHelper ) ;
32943294 return setTextRange (
@@ -3458,7 +3458,7 @@ namespace ts {
34583458 return { target, thisArg } ;
34593459 }
34603460
3461- export function inlineExpressions ( expressions : Expression [ ] ) {
3461+ export function inlineExpressions ( expressions : ReadonlyArray < Expression > ) {
34623462 // Avoid deeply nested comma expressions as traversing them during emit can result in "Maximum call
34633463 // stack size exceeded" errors.
34643464 return expressions . length > 10
0 commit comments