Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99267

Broken typescript intellisense with web workers in VS Code

$
0
0

So I have a typescript/React project in VS Code where I have several different browser apps plus a web worker. The web worker needs different typings from the React apps. By having separate tsconfig.json files in each app, and the web worker folder, I can successfully build and run the project. However, the VS Code intellisense is broken in the web worker code - it is still looking up types in lib.dom.d.ts, which is incorrect. This article appears to offer a solution to exactly this problem, but I have adopted exactly the approach it prescribes, putting separate tsconfigs in each folder, without a tsconfig in the root, and the intellisense still doesn't work properly.

Folder structure is roughly:

- src
  -app1
    tsconfig.json
  -app2 
    tsconfig.json
  -worker
    tsconfig.json

I have not included the actual content of the tsconfigs themselves, because I know them to be correct, since the typescript all compiles perfectly when I build. It's just vscode that does not seem to pick up the correct tsconfig when I am looking at web worker code.


Viewing all articles
Browse latest Browse all 99267

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>