mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Clean up findChildIndex (#16984)
This commit is contained in:
parent
ba8e5a7e24
commit
ba53b42663
@ -839,10 +839,9 @@ namespace ts.server {
|
||||
this.children.length--;
|
||||
}
|
||||
|
||||
findChildIndex(child: LineCollection) {
|
||||
let childIndex = 0;
|
||||
const clen = this.children.length;
|
||||
while ((this.children[childIndex] !== child) && (childIndex < clen)) childIndex++;
|
||||
private findChildIndex(child: LineCollection) {
|
||||
const childIndex = this.children.indexOf(child);
|
||||
Debug.assert(childIndex !== -1);
|
||||
return childIndex;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user