Any 3rd party Vue.js library that I try to add to my project, throws the following error:
Could not find a declaration file for module 'vue-xxx'
I have tried 'vue-treeselect', 'vue-select', 'vue-multiselect' with more or less the same result (* those libraries don't allow import Modulename from, but need const Modulename = require).
I add those under "dependencies": { in package.json.
I am using the SPA template for Vue.js provided by dotnet core.
Full example with 'tree-select':
import Treeselect from 'vue-treeselect';
/* ... */
value = null;
source = [
    {
        id: 'node-1',
        label: 'Node 1',
        children: [
            {
                id: 'node-1-a',
                label: 'Node 1-A',
            }
      ]
    },
    {
        id: 'node-2',
        label: 'Node 2',
    }
  ];
/* ... */
<treeselect v-model="value"
                :multiple="true"
                :options="source" />
Error:
in [at-loader] ./ClientApp/components/mycomponent/mycomponent.ts:10:24 
    TS7016: Could not find a declaration file for module 'vue-treeselect'. 'path/to/project/node_modules/vue-treeselect/dist/vue-treeselect.js' implicitly has an 'any' type.
package.json
{
  "name": "MyProject",
  "private": true,
  "version": "0.0.0",
  "dependencies": {
    "dygraphs": "^2.1.0",
    "ol3-layerswitcher": "^1.1.2",
    "vue-treeselect": "^1.0.6"
  },
  "devDependencies": {
    "@types/dygraphs": "^1.1.6",
    "@types/webpack-env": "^1.13.0",
    "@types/vue": "^2.0.0",
    "aspnet-webpack": "^2.0.1",
    "awesome-typescript-loader": "^3.0.0",
    "bootstrap": "^3.3.6",
    "css-loader": "^0.25.0",
    "event-source-polyfill": "^0.0.7",
    "extract-text-webpack-plugin": "^2.0.0-rc",
    "file-loader": "^0.9.0",
    "isomorphic-fetch": "^2.2.1",
    "jquery": "^3.1.1",
    "style-loader": "^0.13.1",
    "typescript": "^2.2.1",
    "url-loader": "^0.5.7",
    "vue": "^2.5.13",
    "vue-loader": "^14.2.1",
    "vue-property-decorator": "^6.0.0",
    "vue-router": "^3.0.1",
    "vue-template-compiler": "^2.5.13",
    "webpack": "^2.2.0",
    "webpack-hot-middleware": "^2.12.2"    
  }
}
 
     
     
     
     
     
    