Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to file adds too many new lines #54375

Open
gabritto opened this issue May 24, 2023 · 0 comments 路 May be fixed by #55073
Open

Move to file adds too many new lines #54375

gabritto opened this issue May 24, 2023 · 0 comments 路 May be fixed by #55073
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@gabritto
Copy link
Member

gabritto commented May 24, 2023

Bug Report

馃攷 Search Terms

refactoring, move to file

馃捇 Code

source.ts:

import { b } from './other';
const a = 1;
const c = a + b;

target.ts:

export const tt = 2;

Select const c = a + b;, trigger move to file refactoring and select target.ts file.

馃檨 Actual behavior

target.ts:

import { a } from './source';

import { b } from "./other";

export const tt = 2;
const c = a + b;

馃檪 Expected behavior

target.ts:

import { a } from './source';
import { b } from "./other";

export const tt = 2;
const c = a + b;

More examples in the test changes of #54358.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants