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

Filter unnecessary type suggestions in completion list #15750

Closed
mjbvz opened this issue May 10, 2017 · 5 comments
Closed

Filter unnecessary type suggestions in completion list #15750

mjbvz opened this issue May 10, 2017 · 5 comments
Assignees
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor 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 May 10, 2017

From microsoft/vscode#26340

Problem
When working in JavaScript files, we currently show the same suggestions as we do in TypeScript files. These suggestions include many interfaces and types that JavaScript users usually do not care about:

screen shot 2017-05-10 at 3 41 39 pm

Proposed Fix
Suggestions for interfaces and types should only be returned in JavaScript contexts where they are actually useful, such as inside JSDoc

@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label May 10, 2017
@mhegazy mhegazy added this to the TypeScript 2.4 milestone May 10, 2017
@mhegazy mhegazy added Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor labels May 10, 2017
@mhegazy
Copy link
Contributor

mhegazy commented May 10, 2017

JSDoc should still be considered a type location.

We probably should also do a quick pass over gotodef and find all refs, to make sure we are filtering the results in the same way.

@mhegazy mhegazy changed the title Don't Return Unnecessary Type Suggestions in JavaScript Files Filter unnecessary Type Suggestions in completion list May 19, 2017
@mhegazy mhegazy changed the title Filter unnecessary Type Suggestions in completion list Filter unnecessary type suggestions in completion list May 19, 2017
@mhegazy
Copy link
Contributor

mhegazy commented May 19, 2017

To clarify, this issue tracks filtering the entries in the completion list based on the location where the completion is requested. i.e. in a value postilion, type names are not returned, and in a type position, values names are not returned

@waaronking
Copy link

I know this was marked as Fixed, but it's still an issue in the latest version of VS Code. Is this maybe because a fix is planned?

@xhy279
Copy link

xhy279 commented Dec 4, 2017

this is not fixed. still see interface suggestions. Thats sucks and annoying

@mhegazy
Copy link
Contributor

mhegazy commented Dec 4, 2017

We believe this is fixed. if you are still running into issues, please file a new issue, give us the version you are using and enough context to be able to diagnose it. commenting on an old and closed issue does not really help much.

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor 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

5 participants