Description
From @zackschuster on July 18, 2017 18:24
- VSCode Version: 1.15.0-insiders
- OS Version: Windows 10
Steps to Reproduce:
- Open a new file in TypeScript mode. File does not need to be part of a project.
- Copy the code from this gist: https://gist.github.com/zackschuster/3172f3d85e04ea2619d86129d9b4ec60
- Expected behavior is in comments
I left a comment in microsoft/vscode#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
Copied from original issue: microsoft/vscode#30951