Remove the "set" function and use map.set with multiple lines of code if necessary.

This commit is contained in:
Andy Hanson
2016-12-12 08:42:12 -08:00
parent 5c304d0d0f
commit b53b5cf4ab
14 changed files with 91 additions and 45 deletions

View File

@@ -34,7 +34,8 @@ namespace ts.server {
let lineMap = this.lineMaps.get(fileName);
if (!lineMap) {
const scriptSnapshot = this.host.getScriptSnapshot(fileName);
lineMap = set(this.lineMaps, fileName, ts.computeLineStarts(scriptSnapshot.getText(0, scriptSnapshot.getLength())));
lineMap = ts.computeLineStarts(scriptSnapshot.getText(0, scriptSnapshot.getLength()));
this.lineMaps.set(fileName, lineMap);
}
return lineMap;
}