Skip to content

Duplicate auto import suggestions with re-exports #19889

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
jgoz opened this issue Nov 9, 2017 · 2 comments
Closed

Duplicate auto import suggestions with re-exports #19889

jgoz opened this issue Nov 9, 2017 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@jgoz
Copy link

jgoz commented Nov 9, 2017

TypeScript Version: 2.7.0-dev.20171109

(Using VS Code 1.18.0)

Code

env.ts:

export isDevelopmentEnvironment = true;

util.ts:

export * from "./env";

index.ts:

export * from "./util";

test.ts:

if (isDev) // open import suggestions menu

Expected behavior:

See 3 options for isDevelopmentEnvironment, one for the source and two for re-exports.

Actual behavior:

See 3 options for isDevelopmentEnvironment, but all of them are for the index export.

Trace output for completions from tsserver:

image

@ghost ghost self-assigned this Nov 10, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Nov 10, 2017

seems like a duplicate of #19694

@jgoz
Copy link
Author

jgoz commented Nov 10, 2017

Yeah, these are all subtle variations of the same issue. This one is for an in-project re-export; I can think of situations where I would want either the outer-most or the inner-most export, so the duplication isn't a problem for me. It's that the duplicates all point to the same (outer) export.

@ghost ghost closed this as completed in #20043 Nov 16, 2017
@ghost ghost added the Fixed A PR has been merged for this issue label Nov 16, 2017
@mhegazy mhegazy added Bug A bug in TypeScript and removed Duplicate An existing issue was already created labels Nov 17, 2017
@mhegazy mhegazy added this to the TypeScript 2.7 milestone Nov 17, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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
Projects
None yet
Development

No branches or pull requests

2 participants