From 9176b4afa1e43c7907d22e661f91f3320474b998 Mon Sep 17 00:00:00 2001 From: Gabriela Araujo Britto Date: Tue, 23 May 2023 11:36:42 -0700 Subject: [PATCH] minor fixes --- src/harness/client.ts | 2 +- src/services/refactors/moveToFile.ts | 2 +- src/services/tsconfig.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/harness/client.ts b/src/harness/client.ts index 2a9b1e77de9cb..bac4aa3d566e1 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -827,7 +827,7 @@ export class SessionClient implements LanguageService { refactorName: string, actionName: string, preferences: UserPreferences | undefined, - interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo { // >> Update here + interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo { if (preferences) { // Temporarily set preferences this.configure(preferences); } diff --git a/src/services/refactors/moveToFile.ts b/src/services/refactors/moveToFile.ts index 3699ae8c56dee..3b0a0c22ab8e3 100644 --- a/src/services/refactors/moveToFile.ts +++ b/src/services/refactors/moveToFile.ts @@ -176,7 +176,7 @@ registerRefactor(refactorNameForMoveToFile, { function doChange(context: RefactorContext, oldFile: SourceFile, targetFile: string, program: Program, toMove: ToMove, changes: textChanges.ChangeTracker, host: LanguageServiceHost, preferences: UserPreferences): void { const checker = program.getTypeChecker(); const usage = getUsageInfo(oldFile, toMove.all, checker); - //For a new file or an existing blank target file + //For a new file if (!host.fileExists(targetFile)) { changes.createNewFile(oldFile, targetFile, getNewStatementsAndRemoveFromOldFile(oldFile, targetFile, usage, changes, toMove, program, host, preferences)); addNewFileToTsconfig(program, changes, oldFile.fileName, targetFile, hostGetCanonicalFileName(host)); diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index 529ec2e70b145..42c124fdd8156 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -6,5 +6,5 @@ { "path": "../compiler" }, { "path": "../jsTyping" } ], - "include": ["**/*", "refactors/moveToFile.ts"] + "include": ["**/*"] }