TypeScript declaration file that allows using 'import' with *.vue files
npm install vue-typescript-import-dtsimport with *.vue files. The primary use case is a bundler environment like webpack. The file itself consists of 4 lines; this package is just for convenience.1. Install
* npm install vue-typescript-import-dts --save-dev
2. Import (one of):
* Import this module before the import of a .vue file: import 'vue-typescript-import-dts'
* ... or include it in the types field of your tsconfig.json to globally allow using import with .vue files in your project:
``javascript`
{
"compilerOptions": {
"types": ["vue-typescript-import-dts"],
...
Then, it is possible to import a *.vue file:
* import Child from './child.vue'
Note: TypeScript will not type check, parse, or even verify the existence of the .vue file: this project only instructs the TypeScript compiler to assume the import of 'something' that ends with .vue succeeds and is a Vue` object.