Skip to content

Instantly share code, notes, and snippets.

@dkr88

dkr88/vue.d.ts

Created Jun 6, 2018
Embed
What would you like to do?
Required TypeScript definition for .vue single-file components
declare module "*.vue" {
import Vue from "vue"
export default Vue
}
/* Now when you're importing components from a page, for example:
<script lang="ts">
import Vue from 'vue'
import TestComponent from '../components/test-component.vue'
export default Vue.extend({
components: {
'test-component': TestComponent
}
})
</script>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment