We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba8e5a7 commit ba53b42Copy full SHA for ba53b42
src/server/scriptVersionCache.ts
@@ -839,10 +839,9 @@ namespace ts.server {
839
this.children.length--;
840
}
841
842
- findChildIndex(child: LineCollection) {
843
- let childIndex = 0;
844
- const clen = this.children.length;
845
- while ((this.children[childIndex] !== child) && (childIndex < clen)) childIndex++;
+ private findChildIndex(child: LineCollection) {
+ const childIndex = this.children.indexOf(child);
+ Debug.assert(childIndex !== -1);
846
return childIndex;
847
848
0 commit comments