Skip to content

Commit 59ce470

Browse files
committed
ok
1 parent d9ff2c4 commit 59ce470

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

src/services/textChanges.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ namespace ts.textChanges {
313313
useIndentationFromFile: true,
314314
range: { pos: adjustedEndPosition, end: adjustedEndPosition },
315315
node: newNode,
316-
options: {}
316+
options: { suffix: getLineOfLocalPosition(sourceFile, after.end) !== getLineOfLocalPosition(sourceFile, adjustedEndPosition) ? this.newLineCharacter: "" }
317317
});
318318
}
319319
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
===ORIGINAL===
2+
3+
import {
4+
x // this is x
5+
} from "bar"
6+
===MODIFIED===
7+
8+
import {
9+
x, // this is x
10+
b as a
11+
} from "bar"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
===ORIGINAL===
2+
3+
import {
4+
x // this is x
5+
} from "bar"
6+
===MODIFIED===
7+
8+
import {
9+
x, // this is x
10+
a
11+
} from "bar"

0 commit comments

Comments
 (0)