TypeScript declaration file that allows using
*.vue files. The primary use case is a bundler environment like Browserify with vueify. The file itself consists of 5 lines; this package is just for convenience.
This package requires TypeScript 2 and Vue.js 2, which ships with new type definitions in the Vue.js package itself. Both must be installed separately in your project, which allows choosing a suitable version.
npm install vue-typescript-import-dts --save-dev
Include it in the
types field of your
Then, it is possible to
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
Please not that 3.0 of this package uses ES6
export default which also changes the import syntax to the example above. Please use version 2.0 if you prefer the CommonJS compatibility syntax:
If you are using TypeScript 2 together with Vue.js 2, you might also be interested in