In Visual Studio Code, since few days, Intellisense stop to underline wrong path file in my code.
And when I put the mouse over the wrong line, it displaying "module '*'" :
How to (re)activate this?
I add more informations : here is my tsconfig :
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"types": ["node"],
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2016",
"dom"
]
}
}
User settings in VSCode :
{
"files.exclude": {
"**/*.js": {"when" : "$(basename).ts"},
"**/*.js.map": true
}
}
您需要在tsconfig中设置“模块”属性。
I've comment this line in the file typings.d.ts
declare module '*';
It's ok now.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.