diff --git a/src/server/scriptVersionCache.ts b/src/server/scriptVersionCache.ts index e25ddf9e03b6b..464eea2efabe1 100644 --- a/src/server/scriptVersionCache.ts +++ b/src/server/scriptVersionCache.ts @@ -851,9 +851,9 @@ namespace ts.server { } // assume there is room for the item; return true if more room - add(collection: LineCollection) { + add(collection: LineCollection): void { this.children.push(collection); - return (this.children.length < lineCollectionCapacity); + Debug.assert(this.children.length <= lineCollectionCapacity); } charCount() {