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

Already on GitHub? Sign in to your account

Organize Imports Removes Aliased Imports #47362

Closed
Bibliofile opened this issue Apr 6, 2018 · 3 comments
Closed

Organize Imports Removes Aliased Imports #47362

Bibliofile opened this issue Apr 6, 2018 · 3 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@Bibliofile
Copy link

Issue Type: Bug

  1. Create the following files
    a.ts

    export const a = 1

    b.ts

    import { a as b } from './a'
    console.log(b * 5)
  2. Run Organize Imports on b.ts

  3. The import is removed, even though it is used.

VS Code version: Code - Insiders 1.23.0-insider (95101bf, 2018-04-06T08:49:48.798Z)
OS version: Windows_NT x64 10.0.16299

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 x 2295)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: enabled
video_encode: enabled
vpx_decode: unavailable_software
webgl: enabled
webgl2: enabled
Memory (System) 15.88GB (8.80GB free)
Process Argv C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe
Screen Reader no
VM 50%
Extensions (2)
Extension Author (truncated) Version
tslint eg2 1.0.28
code-spell-checker str 1.6.5
@vscodebot vscodebot bot added the insiders label Apr 6, 2018
@vscodebot
Copy link

vscodebot bot commented Apr 6, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@Bibliofile
Copy link
Author

I also see this issue in the latest non-insiders version.

@mjbvz
Copy link
Contributor

mjbvz commented Apr 6, 2018

Duplicate of #47310

@mjbvz mjbvz marked this as a duplicate of #47310 Apr 6, 2018
@mjbvz mjbvz closed this as completed Apr 6, 2018
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Apr 6, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants