@@ -279,7 +279,7 @@ function getSelectionChildren(node: Node): readonly Node[] {
279279 * Groups sibling nodes together into their own SyntaxList if they
280280 * a) are adjacent, AND b) match a predicate function.
281281 */
282- function groupChildren ( children : Node [ ] , groupOn : ( child : Node ) => boolean ) : Node [ ] {
282+ function groupChildren ( children : readonly Node [ ] , groupOn : ( child : Node ) => boolean ) : Node [ ] {
283283 const result : Node [ ] = [ ] ;
284284 let group : Node [ ] | undefined ;
285285 for ( const child of children ) {
@@ -315,7 +315,7 @@ function groupChildren(children: Node[], groupOn: (child: Node) => boolean): Nod
315315 * @param separateTrailingSemicolon If the last token is a semicolon, it will be returned as a separate
316316 * child rather than be included in the right-hand group.
317317 */
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 [ ] {
319319 if ( children . length < 2 ) {
320320 return children ;
321321 }
@@ -336,7 +336,7 @@ function splitChildren(children: Node[], pivotOn: (child: Node) => boolean, sepa
336336 return separateLastToken ? result . concat ( lastToken ) : result ;
337337}
338338
339- function createSyntaxList ( children : Node [ ] ) : SyntaxList {
339+ function createSyntaxList ( children : readonly Node [ ] ) : SyntaxList {
340340 Debug . assertGreaterThanOrEqual ( children . length , 1 ) ;
341341 return setTextRangePosEnd ( parseNodeFactory . createSyntaxList ( children ) , children [ 0 ] . pos , last ( children ) . end ) ;
342342}
0 commit comments