Add a getFullText() helper method to IScriptSnapshot (#21155)

* Add a `getFullText()` helper method to `IScriptSnapshot`

* Use a function instead of a method
This commit is contained in:
Andy
2018-01-12 10:44:39 -08:00
committed by GitHub
parent b529d5ba1f
commit d2fd137d88
13 changed files with 31 additions and 69 deletions

View File

@@ -370,8 +370,7 @@ namespace ts.server {
}
saveTo(fileName: string) {
const snap = this.textStorage.getSnapshot();
this.host.writeFile(fileName, snap.getText(0, snap.getLength()));
this.host.writeFile(fileName, getSnapshotText(this.textStorage.getSnapshot()));
}
/*@internal*/