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

Type literals handled poorly by IntelliSense #30951

Closed
zackschuster opened this issue Jul 18, 2017 · 1 comment
Closed

Type literals handled poorly by IntelliSense #30951

zackschuster opened this issue Jul 18, 2017 · 1 comment
Assignees
Labels
typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@zackschuster
Copy link

  • VSCode Version: 1.15.0-insiders
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open a new file in TypeScript mode. File does not need to be part of a project.
  2. Copy the code from this gist: https://gist.github.com/zackschuster/3172f3d85e04ea2619d86129d9b4ec60
  3. Expected behavior is in comments

I left a comment in #25034 with some of this info, then after finding more problems I decided to post a new issue. I bring this up because issues here may indirectly affect that bug.

Basically, it seems that IntelliSense is given a lot of over-simplified information w/r/t type literals, none of which follows a reliable or even necessarily coherent theory; depending on the context, the same literal may be revealed as its primitive, as its type alias, or as a completely unrelated type alias (!!!) that just happens to share properties.

While none of this appears to have an impact on compile-time correctness, it does make navigating code with IntelliSense more cumbersome than it needs to be while losing an opportunity to use keyof and crew with vscode in really powerful ways.

Reproduces without extensions: Yes

@mjbvz
Copy link
Contributor

mjbvz commented Jul 19, 2017

This issue was moved to microsoft/TypeScript#17310

@mjbvz mjbvz closed this as completed Jul 19, 2017
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jul 19, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants