Skip to content

Instantly share code, notes, and snippets.

@mitchell-garcia
Last active January 15, 2018 15:11
Show Gist options
  • Save mitchell-garcia/a1d7d8fca5c98c9aeb0da7766cfceb4c to your computer and use it in GitHub Desktop.
Save mitchell-garcia/a1d7d8fca5c98c9aeb0da7766cfceb4c to your computer and use it in GitHub Desktop.
Typing Props
<script lang="ts">
import Vue from "vue"
interface TestComponentData {
testingProp: string
theme: "white" | "red"
}
export default Vue.extend({
data() {
return {
testingProp: "test",
theme: "white"
} as TestComponentData
}
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment