MCPcopy
hub / github.com/angular/angular / overwrite

Method overwrite

packages/language-service/test/legacy/mock_host.ts:205–208  ·  view source on GitHub ↗

* Overwrite the entire content of `fileName` with `newText`. If cursor is * present in `newText`, it will be removed and the position of the cursor * will be returned.

(fileName: string, newText: string)

Source from the content-addressed store, hash-verified

203 * will be returned.
204 */
205 overwrite(fileName: string, newText: string): OverwriteResult {
206 const scriptInfo = this.getScriptInfo(fileName);
207 return this.overwriteScriptInfo(scriptInfo, newText);
208 }
209
210 /**
211 * Overwrite an inline template defined in `fileName` and return the entire

Callers 9

index_spec.tsFile · 0.80
addTripleSlashTypeFunction · 0.80
writeFileFunction · 0.80
mock_host_spec.tsFile · 0.80
diagnostic_spec.tsFile · 0.80
writeFileFunction · 0.80

Calls 2

getScriptInfoMethod · 0.95
overwriteScriptInfoMethod · 0.95

Tested by

no test coverage detected