MCPcopy Index your code
hub / github.com/angular/angular / reset

Method reset

packages/language-service/test/legacy/mock_host.ts:231–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 2

getScriptInfoMethod · 0.95
clearMethod · 0.45

Tested by

no test coverage detected