-
Notifications
You must be signed in to change notification settings - Fork 12.8k
VSCode shows unexpected problem on valid ts codes after v1.68.1 #50191
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
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.70.0. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
Behavior is similar to to #50161 . Relevant log:
|
It is somewhat buggy in TypeScript playground as well, see here |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
This is valid typescript, and it works OK in v1.67.2 and prior versions.
However, in v1.68.1 and newer(tested in 1.68.1, 1.69.2, 1.70.0), the editor shows two unexpected problems:
Cannot find name 'A'.ts(2304)
'A' only refers to a type, but is being used as a namespace here.ts(2702)
Screenshots for comparison:

1.67.2
1.68.1

Notice that this code works OK in Typescript Playground v4.7.3 (which is bundled by VSCode v1.68.1), so I suppose it may be caused by vscode itself rather than the tsserver.
(updated 2022.9.4) Add two similar cases:
The text was updated successfully, but these errors were encountered: