@@ -279,7 +279,7 @@ function getSelectionChildren(node: Node): readonly Node[] {
279
279
* Groups sibling nodes together into their own SyntaxList if they
280
280
* a) are adjacent, AND b) match a predicate function.
281
281
*/
282
- function groupChildren ( children : Node [ ] , groupOn : ( child : Node ) => boolean ) : Node [ ] {
282
+ function groupChildren ( children : readonly Node [ ] , groupOn : ( child : Node ) => boolean ) : Node [ ] {
283
283
const result : Node [ ] = [ ] ;
284
284
let group : Node [ ] | undefined ;
285
285
for ( const child of children ) {
@@ -315,7 +315,7 @@ function groupChildren(children: Node[], groupOn: (child: Node) => boolean): Nod
315
315
* @param separateTrailingSemicolon If the last token is a semicolon, it will be returned as a separate
316
316
* child rather than be included in the right-hand group.
317
317
*/
318
- function splitChildren ( children : Node [ ] , pivotOn : ( child : Node ) => boolean , separateTrailingSemicolon = true ) : Node [ ] {
318
+ function splitChildren ( children : readonly Node [ ] , pivotOn : ( child : Node ) => boolean , separateTrailingSemicolon = true ) : readonly Node [ ] {
319
319
if ( children . length < 2 ) {
320
320
return children ;
321
321
}
@@ -336,7 +336,7 @@ function splitChildren(children: Node[], pivotOn: (child: Node) => boolean, sepa
336
336
return separateLastToken ? result . concat ( lastToken ) : result ;
337
337
}
338
338
339
- function createSyntaxList ( children : Node [ ] ) : SyntaxList {
339
+ function createSyntaxList ( children : readonly Node [ ] ) : SyntaxList {
340
340
Debug . assertGreaterThanOrEqual ( children . length , 1 ) ;
341
341
return setTextRangePosEnd ( parseNodeFactory . createSyntaxList ( children ) , children [ 0 ] . pos , last ( children ) . end ) ;
342
342
}
0 commit comments