🤖 Pick PR #58846 (Ensure the updates with crashes rev...) into release-5.5 by typescript-bot · Pull Request #58847 · microsoft/TypeScript
Expand Up
@@ -2245,8 +2245,12 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
this.getScriptInfo(rootFile)?.editContent(0, originalText.length, updatedText); this.updateGraph(); cb(this.program!, originalProgram, (this.program?.getSourceFile(rootFile))!); this.getScriptInfo(rootFile)?.editContent(0, this.program!.getSourceFile(rootFile)!.getText().length, originalText); try { cb(this.program!, originalProgram, (this.program?.getSourceFile(rootFile))!); } finally { this.getScriptInfo(rootFile)?.editContent(0, this.program!.getSourceFile(rootFile)!.getText().length, originalText); } }
/** @internal */ Expand Down
this.getScriptInfo(rootFile)?.editContent(0, originalText.length, updatedText); this.updateGraph(); cb(this.program!, originalProgram, (this.program?.getSourceFile(rootFile))!); this.getScriptInfo(rootFile)?.editContent(0, this.program!.getSourceFile(rootFile)!.getText().length, originalText); try { cb(this.program!, originalProgram, (this.program?.getSourceFile(rootFile))!); } finally { this.getScriptInfo(rootFile)?.editContent(0, this.program!.getSourceFile(rootFile)!.getText().length, originalText); } }
/** @internal */ Expand Down