I try to use tsx to run a NodeJS application made of JavaScript and Typescript modules. The JavaScript modules are ESM, not CommonJS. For example I have these files:
// provider.tsexport funcA(p: unknown): unknown {...}// consumer.jsimport * as provider from "./provider.ts"provider.funcA("foo");
It runs very well with tsx. VSCode's intellisense works well in TS file but it doesn't in JS file. When I hover provider
it shows import provider
and I have no completion whatsoever.Here is my tsconfig.json
:
{"compilerOptions": {"module": "NodeNext","target": "ESNext","allowJs": true,"strict": true, },"include": [<the directory containing both JS and TS files> ],}
How can I make Intellisense work in VSCode for TS imports in my JS files?