From 81d1732fd8970aa8b80dbbea30ccb45043990978 Mon Sep 17 00:00:00 2001 From: Jesse Trinity Date: Fri, 15 May 2020 12:44:43 -0700 Subject: [PATCH] respond to review comment --- src/services/textChanges.ts | 4 +--- src/testRunner/unittests/services/organizeImports.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index fe926d03175..216301fc011 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -287,9 +287,7 @@ namespace ts.textChanges { } public deleteNode(sourceFile: SourceFile, node: Node, options: ConfigurableStartEnd = { leadingTriviaOption: LeadingTriviaOption.IncludeAll }): void { - const startPosition = getAdjustedStartPosition(sourceFile, node, options); - const endPosition = getAdjustedEndPosition(sourceFile, node, options); - this.deleteRange(sourceFile, { pos: startPosition, end: endPosition }); + this.deleteRange(sourceFile, getAdjustedRange(sourceFile, node, node, options)); } public deleteModifier(sourceFile: SourceFile, modifier: Modifier): void { diff --git a/src/testRunner/unittests/services/organizeImports.ts b/src/testRunner/unittests/services/organizeImports.ts index 66f78c11e54..3e2b1108931 100644 --- a/src/testRunner/unittests/services/organizeImports.ts +++ b/src/testRunner/unittests/services/organizeImports.ts @@ -591,7 +591,7 @@ import "lib1"; }, { path: "/lib1.ts", content: "" }, { path: "/lib2.ts", content: "" }); - + testOrganizeImports("SortComments", { path: "/test.ts",