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

Intellisense for required modules doesn't work in .vscode-test.js #196554

Closed
chrmarti opened this issue Oct 25, 2023 · 1 comment
Closed

Intellisense for required modules doesn't work in .vscode-test.js #196554

chrmarti opened this issue Oct 25, 2023 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release javascript JavaScript support issues verified Verification succeeded
Milestone

Comments

@chrmarti
Copy link
Contributor

Testing #196332

This would also enable IntelliSense. The only way I could get it working is by changing the require to an import, but that then fails at runtime suggesting to use "type": "module" in the package.json.

@connor4312
Copy link
Member

connor4312 commented Oct 25, 2023

I think this is something in TS. It seems like require() types recently(?) stopped working in commonjs .js files. For instance, making a new file foo.js in the vscode repo doesn't get types for requiring TypeScript. It also doesn't get types for built-in Node modules, in spite of them appearing as completions, even with @ts-check.

image

Intellisense did work in commonjs files when I first made it a few weeks ago.

@connor4312 connor4312 changed the title Document a simple way to type-check .vscode-test.js Intellisense for required modules doesn't work in .vscode-test.js Oct 25, 2023
@connor4312 connor4312 assigned mjbvz and unassigned connor4312 Oct 25, 2023
@mjbvz mjbvz added this to the October 2023 milestone Oct 30, 2023
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues candidate Issue identified as probable candidate for fixing in the next release labels Oct 30, 2023
mjbvz added a commit to mjbvz/vscode that referenced this issue Oct 30, 2023
Fixes microsoft#196554

Looks like bundler breaks `require()` intellisense
mjbvz added a commit to mjbvz/vscode that referenced this issue Oct 30, 2023
Fixes microsoft#196554

Looks like bundler breaks `require()` intellisense
mjbvz added a commit that referenced this issue Oct 30, 2023
Fixes #196554

Looks like bundler breaks `require()` intellisense
@mjbvz mjbvz closed this as completed in 0279c52 Oct 30, 2023
@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Oct 30, 2023
@ulugbekna ulugbekna removed the unreleased Patch has not yet been released in VS Code Insiders label Nov 1, 2023
@bhavyaus bhavyaus added the verified Verification succeeded label Nov 1, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release javascript JavaScript support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants