Created
June 6, 2018 00:28
-
-
Save dkr88/44253a0cd204557e2433ca9f73671f85 to your computer and use it in GitHub Desktop.
Required TypeScript definition for .vue single-file components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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