TypeScript: Using `require` in method or Class breaks JavaScript IntelliSense

Hi since 2017 this issue seem not fixed and can’t find any solution! Did you have a tips to fix this guys ?

The current problem is when I use. ex: require('fs') in a js Class. My class IntelliSense become broken. requireIssusIntelli

Hope i can get help. Thanks

related to: https://github.com/microsoft/vscode/issues/51758 https://github.com/microsoft/vscode/issues/37126

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (4 by maintainers)

Most upvoted comments

for now , alternative it use eval in dev 😃 example:

var fs = eval("require('fs')");

will not break intellisense. thanks for help or other suggest.

Double checked and this is what we expect it to be, thanks for the issue, I’m going to close jt