mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
addressed CR feedback: renamed update to updateSourceFile
This commit is contained in:
@@ -658,7 +658,7 @@ module ts {
|
||||
// from this SourceFile that are being held onto may change as a result (including
|
||||
// becoming detached from any SourceFile). It is recommended that this SourceFile not
|
||||
// be used once 'update' is called on it.
|
||||
export function update(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile {
|
||||
export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile {
|
||||
if (textChangeRangeIsUnchanged(textChangeRange)) {
|
||||
// if the text didn't change, then we can just return our current source file as-is.
|
||||
return sourceFile;
|
||||
|
||||
@@ -1587,7 +1587,7 @@ module ts {
|
||||
if (version !== sourceFile.version || isOpen != sourceFile.isOpen) {
|
||||
// Once incremental parsing is ready, then just call into this function.
|
||||
if (!disableIncrementalParsing) {
|
||||
var newSourceFile = update(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange);
|
||||
var newSourceFile = updateSourceFile(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange);
|
||||
setSourceFileFields(newSourceFile, scriptSnapshot, version, isOpen);
|
||||
return newSourceFile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user