move saveTo to ScriptInfo

This commit is contained in:
Vladimir Matveev
2016-07-11 19:51:14 -07:00
parent ac9717dc3d
commit aea1534704
3 changed files with 8 additions and 15 deletions

View File

@@ -110,6 +110,11 @@ namespace ts.server {
this.markContainingProjectsAsDirty();
}
saveTo(fileName: string) {
const snap = this.snap();
this.host.writeFile(fileName, snap.getText(0, snap.getLength()));
}
reloadFromFile() {
this.svc.reloadFromFile(this.fileName);
this.markContainingProjectsAsDirty();