'How to ignore "Could not find a declaration" error in VS Code and TypeScript
I'm working with Typescript and Vue Cli using VS Code. I'm getting a "definition missing warning" at this line:
import { setupCalendar, DatePicker } from "v-calendar";
Could not find a declaration file for module 'v-calendar'.
This error does affects tsc compilation, but VS Code is always showing this error at the code and at the navigation bar
What Can I do in order to dismiss this error and get my "no error" status back ?
PS: v-calendar has no definition, it is a third part imported module.
PS: Here are my "tsconfig.json"
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"esModuleInterop": true,
"strictPropertyInitialization": false,
"strictNullChecks": false,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": ["webpack-env", "mocha", "chai"],
"paths": {
"@/*": ["src/*"]
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],
"exclude": ["node_modules"]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

