Skip to content

Move to new file refactoring misses path update for import * paths #24583

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mjbvz opened this issue Jun 1, 2018 · 0 comments
Closed

Move to new file refactoring misses path update for import * paths #24583

mjbvz opened this issue Jun 1, 2018 · 0 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 1, 2018

From microsoft/vscode#50953

TypeScript Version: 3.0.0-dev.20180601

Search Terms:

  • Move to new file
  • refactoring

Code
For a project

a.ts

export const x = 123

b.ts

import * as a from './a'
console.log(a.x)
  1. Run the move to new file refactoring on export const x

Expected behavior:
Unclear what exact behavior should be for b.ts. Perhaps:

import * as a from './a'
import { x } from './x'
console.log(x);

or

import * as a from './a'
import * as x from './x'
console.log(x.x);

Actual behavior:
No update to b.ts. File is now invalid:

b.ts

import * as a from './a'
console.log(a.x)
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Jun 1, 2018
@mhegazy mhegazy assigned ghost Jun 1, 2018
@mhegazy mhegazy added the Bug A bug in TypeScript label Jun 1, 2018
@mhegazy mhegazy added this to the TypeScript 2.9.2 milestone Jun 1, 2018
@ghost ghost added the Fixed A PR has been merged for this issue label Jun 1, 2018
@ghost ghost closed this as completed in #24612 Jun 4, 2018
@microsoft microsoft locked and limited conversation to collaborators Aug 3, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

2 participants