switching to noUnusedLocals : for #37212

This commit is contained in:
Martin Aeschlimann
2017-11-13 13:53:30 +01:00
parent 3ac890f6ed
commit 7a2065f582
4 changed files with 1 additions and 15 deletions

View File

@@ -15,13 +15,10 @@ export function applyEdits(document: TextDocument, edits: TextEdit[]): string {
}
return startDiff;
});
// @ts-ignore unused local
let lastOffset = text.length;
sortedEdits.forEach(e => {
let startOffset = document.offsetAt(e.range.start);
let endOffset = document.offsetAt(e.range.end);
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
lastOffset = startOffset;
});
return text;
}