{"id":21701432,"url":"https://github.com/ktsn/vuetype","last_synced_at":"2025-04-10T03:50:55.160Z","repository":{"id":54586457,"uuid":"77363520","full_name":"ktsn/vuetype","owner":"ktsn","description":"Generate TypeScript declaration files for .vue files","archived":false,"fork":false,"pushed_at":"2020-03-09T13:47:40.000Z","size":131,"stargazers_count":122,"open_issues_count":11,"forks_count":27,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T02:09:21.632Z","etag":null,"topics":["dts","typescript","vue","vue-files"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ktsn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-26T06:36:20.000Z","updated_at":"2024-09-26T09:14:16.000Z","dependencies_parsed_at":"2022-08-13T20:31:35.001Z","dependency_job_id":null,"html_url":"https://github.com/ktsn/vuetype","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsn%2Fvuetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsn%2Fvuetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsn%2Fvuetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsn%2Fvuetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktsn","download_url":"https://codeload.github.com/ktsn/vuetype/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154999,"owners_count":21056542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dts","typescript","vue","vue-files"],"created_at":"2024-11-25T20:19:56.218Z","updated_at":"2025-04-10T03:50:55.135Z","avatar_url":"https://github.com/ktsn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vuetype\n\n[![npm version](https://badge.fury.io/js/vuetype.svg)](https://badge.fury.io/js/vuetype)\n[![Build Status](https://travis-ci.org/ktsn/vuetype.svg?branch=master)](https://travis-ci.org/ktsn/vuetype)\n\nGenerate TypeScript declaration files for .vue files\n\n## Installation\n\nYou can use `vuetype` command after exec one of following commands.\n\n```bash\n$ npm install --global vuetype # npm\n$ yarn global add vuetype # yarn\n```\n\n## Usage\n\nSpecify the directory that includes your `.vue` files as the 2nd argument of `vuetype` command. Note that the `.vue` files should have TypeScript code (in `\u003cscript lang=\"ts\"\u003e` element).\n\n```bash\nvuetype src/components\n```\n\nThen `.vue.d.ts` file corresponding `.vue` file will be output. So you can import each `.vue` component with concrete type declaration! This would useful if you would like to unit test your components in TypeScript.\n\nFor example, if there is the following component:\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv\u003e{{ message }}\u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript lang=\"ts\"\u003e\nimport Vue from 'vue'\nimport Component from 'vue-class-component'\n\n@Component\nexport default class MyComp extends Vue {\n  message = 'Hello'\n}\n\u003c/script\u003e\n```\n\nYou will acquire the following declaration file:\n\n```ts\nimport Vue from 'vue';\nexport default class MyComp extends Vue {\n    message: string;\n}\n```\n\n### Watch mode\n\nYou can enable watch mode by adding `--watch` (shorthand `-w`) flag. In the watch mode, vuetype watches update of `.vue` files and generates declaration files when the `.vue` files are updated.\n\n```bash\nvuetype --watch src/components\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsn%2Fvuetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktsn%2Fvuetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsn%2Fvuetype/lists"}