Skip to content

Commit 900d6f7

Browse files
committed
renames
1 parent dbae2cb commit 900d6f7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/compiler/builder.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,11 @@ namespace ts {
516516

517517
const result = createRedirectedBuilderProgram(state, configFileParsingDiagnostics);
518518
result.getState = () => state;
519-
result.backupCurrentState = () => {
519+
result.backupState = () => {
520520
Debug.assert(backupState === undefined);
521521
backupState = cloneBuilderProgramState(state);
522522
};
523-
result.useBackupState = () => {
523+
result.restoreState = () => {
524524
state = Debug.assertDefined(backupState);
525525
backupState = undefined;
526526
};
@@ -715,8 +715,8 @@ namespace ts {
715715
export function createRedirectedBuilderProgram(state: { program: Program | undefined; compilerOptions: CompilerOptions; }, configFileParsingDiagnostics: ReadonlyArray<Diagnostic>): BuilderProgram {
716716
return {
717717
getState: notImplemented,
718-
backupCurrentState: noop,
719-
useBackupState: noop,
718+
backupState: noop,
719+
restoreState: noop,
720720
getProgram,
721721
getProgramOrUndefined: () => state.program,
722722
releaseProgram: () => state.program = undefined,
@@ -766,9 +766,9 @@ namespace ts {
766766
/*@internal*/
767767
getState(): BuilderProgramState;
768768
/*@internal*/
769-
backupCurrentState(): void;
769+
backupState(): void;
770770
/*@internal*/
771-
useBackupState(): void;
771+
restoreState(): void;
772772
/**
773773
* Returns current program
774774
*/

src/compiler/tsbuild.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ namespace ts {
11291129
}
11301130

11311131
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
1132-
program.backupCurrentState();
1132+
program.backupState();
11331133
let newestDeclarationFileContentChangedTime = minimumDate;
11341134
let anyDtsChanged = false;
11351135
let declDiagnostics: Diagnostic[] | undefined;
@@ -1138,7 +1138,7 @@ namespace ts {
11381138
emitFilesAndReportErrors(program, reportDeclarationDiagnostics, writeFileName, /*reportSummary*/ undefined, (name, text, writeByteOrderMark) => outputFiles.push({ name, text, writeByteOrderMark }));
11391139
// Don't emit .d.ts if there are decl file errors
11401140
if (declDiagnostics) {
1141-
program.useBackupState();
1141+
program.restoreState();
11421142
return buildErrors(declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file");
11431143
}
11441144

0 commit comments

Comments
 (0)