()
| 229 | } |
| 230 | |
| 231 | reset(): void { |
| 232 | if (this.overwritten.size === 0) { |
| 233 | return; |
| 234 | } |
| 235 | for (const fileName of this.overwritten) { |
| 236 | const scriptInfo = this.getScriptInfo(fileName); |
| 237 | const reloaded = scriptInfo.reloadFromFile(); |
| 238 | if (!reloaded) { |
| 239 | throw new Error(`Failed to reload ${scriptInfo.fileName}`); |
| 240 | } |
| 241 | } |
| 242 | this.overwritten.clear(); |
| 243 | // updateGraph() will clear the internal dirty flag. |
| 244 | this.project.updateGraph(); |
| 245 | } |
| 246 | |
| 247 | getScriptInfo(fileName: string): ts.server.ScriptInfo { |
| 248 | const scriptInfo = this.ps.getScriptInfo(fileName); |
nothing calls this directly
no test coverage detected