I'm trying to make use of Puppeteer within a ts file which works fine except the VSCode Intellisense stops working a soon as I'm inside a .ts and not a .js file. I've seen some posts about this incident but none could help me. What I did:
- created a project via npm init
- installed dependencies as follows:
"dependencies": {
"@types/node": "^14.0.14",
"events": "^3.1.0",
"puppeteer": "^4.0.1",
"typescript": "^3.9.5" }
"devDependencies": {
"puppeteer-tsd": "0.0.2" }
created tsconfig.json
"target": "es5", "lib": ["es2015", "dom"], "outDir": "./dist", . . . "include": ["src", "node_modules/puppeteer-tsd/src/index.d.ts"]
created src and dist folder
put a main.ts inside my src
told VSCode to use the project TS version instead of its own
Then I compiled. Everything works fine. But I get no IntelliSense to help me out while I type. So I created a .js file in my src directory, copied the code from my main.ts inside it and then I got Intellisense to work perfectly fine with all suggestions and so on. And I have no idea left what I could try except accepting it and code without it. I'd be greatful for any suggestions on what could be the issue. Thx in advance!
Edit: Meanwhile I found out, that it works fine with non imported functions like console.log(). It's only Puppeteer (or probably any imported module).
Edit 2: Heres a Link to my Log File.