📝 Edit page
➕ Add page
TypeScript support
See my starter project.
Notes copied from the docs linked in Resources.
Vue 2
<script lang="ts">
import Vue from 'vue'
// Type inference enabled.
const Component = Vue.extend({
})
// No type inference.
const Component = {
}
</script>
Vue 3
Set language
<script lang="ts">
import Vue from "vue";
export default Vue.extend({
name: "HelloWorld",
props: {
msg: String,
},
});
</script>
Define Vue components
<script lang="ts">
import { defineComponent } from 'vue'
const Component = defineComponent({
})
</script>