Autocomplete is not working in js file in VSCode, but if I import it into a ts file then it works, not sure whats wrong.
// my-ts.ts
export const m2 = (p: number) => p * 2;
export const m3 = (p: number) => p * 3;
export const m4 = (p: number) => p * 4;
here is js file
//my-js.js file
import * as helpers from './my-ts.ts';
helpers.[NO HINT HERE]
helpers.anything(); // no error even here
here is the tsconfig.json file
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": false,
"experimentalDecorators": true,
"resolveJsonModule": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env",
"jest"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}