File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ import {
6060 SortKind ,
6161 SourceFile ,
6262 stableSort ,
63- suppressLeadingTrivia ,
6463 SyntaxKind ,
6564 textChanges ,
6665 TransformFlags ,
@@ -137,7 +136,7 @@ export function organizeImports(
137136 // on the first import because it is probably the header comment for the file.
138137 // Consider: we could do a more careful check that this trivia is actually a header,
139138 // but the consequences of being wrong are very minor.
140- suppressLeadingTrivia ( oldImportDecls [ 0 ] ) ;
139+ setEmitFlags ( oldImportDecls [ 0 ] , EmitFlags . NoLeadingComments ) ;
141140
142141 const oldImportGroups = shouldCombine
143142 ? group ( oldImportDecls , importDecl => getExternalModuleName ( importDecl . moduleSpecifier ) ! )
Original file line number Diff line number Diff line change 1+ /// <reference path="fourslash.ts" />
2+
3+ // @filename : /a.ts
4+ ////export interface LocationDefinitions {}
5+ ////export interface PersonDefinitions {}
6+
7+ // @filename : /b.ts
8+ ////export {
9+ //// /** @deprecated Use LocationDefinitions instead */
10+ //// LocationDefinitions as AddressDefinitions,
11+ //// LocationDefinitions,
12+ //// /** @deprecated Use PersonDefinitions instead */
13+ //// PersonDefinitions as NameDefinitions,
14+ //// PersonDefinitions,
15+ //// } from './a';
16+
17+ goTo . file ( "/b.ts" ) ;
18+ verify . organizeImports (
19+ `export {
20+ /** @deprecated Use LocationDefinitions instead */
21+ LocationDefinitions as AddressDefinitions,
22+ LocationDefinitions,
23+ /** @deprecated Use PersonDefinitions instead */
24+ PersonDefinitions as NameDefinitions,
25+ PersonDefinitions
26+ } from './a';
27+ ` ) ;
You can’t perform that action at this time.
0 commit comments