MCPcopy Create free account
hub / github.com/angular/angular / replaceText

Method replaceText

packages/core/schematics/utils/change_tracker.ts:69–71  ·  view source on GitHub ↗

* Replaces text within a file. * @param sourceFile File in which to replace the text. * @param start Index from which to replace the text. * @param removeLength Length of the text being replaced. * @param text Text to be inserted instead of the old one.

(sourceFile: ts.SourceFile, start: number, removeLength: number, text: string)

Source from the content-addressed store, hash-verified

67 * @param text Text to be inserted instead of the old one.
68 */
69 replaceText(sourceFile: ts.SourceFile, start: number, removeLength: number, text: string): void {
70 this._trackChange(sourceFile, {start, removeLength, text});
71 }
72
73 /**
74 * Replaces the text of an AST node with a new one.

Callers 3

replaceNodeMethod · 0.95
applyInternalOnlyChangesFunction · 0.80

Calls 1

_trackChangeMethod · 0.95

Tested by

no test coverage detected