Generate TypeScript declaration files for .vue files
Last updated 3 months ago by k-okina .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kahirokunn/vuedts 
SYNC missed versions from official npm registry.


This repository is fork from https://github.com/ktsn/vuetype Because that repository has not maintained now.

npm version Build Status

Generate TypeScript declaration files for .vue files

Sample Repository



You can use vuedts command after exec one of following commands.

$ npm install --global @kahirokunn/vuedts # npm
$ yarn global add @kahirokunn/vuedts # yarn


Specify the directory that includes your .vue files as the 2nd argument of vuedts command. Note that the .vue files should have TypeScript code (in <script lang="ts"> element).

vuedts src/components

Then .vue.d.ts file corresponding .vue file will be output. So you can import each .vue component with concrete type declaration! This would help your editor inspect.

For example, if there is the following component:

  <div>{{ message }}</div>

<script lang="ts">
import Vue from 'vue'
import Component from 'vue-class-component'

export default class MyComp extends Vue {
  message = 'Hello'

You will acquire the following declaration file:

import Vue from 'vue';
export default class MyComp extends Vue {
    message: string;

Watch mode

You can enable watch mode by adding --watch (shorthand -w) flag. In the watch mode, vuedts watches update of .vue files and generates declaration files when the .vue files are updated.

vuedts --watch src/components



Current Tags

  • 1.3.3                                ...           latest (3 months ago)

7 Versions

  • 1.3.3                                ...           3 months ago
  • 1.3.2                                ...           3 months ago
  • 1.3.1                                ...           3 months ago
  • 1.3.0                                ...           3 months ago
  • 1.2.0                                ...           3 months ago
  • 1.1.0                                ...           4 months ago
  • 1.0.0                                ...           5 months ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (9)
Dev Dependencies (19)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |