feat: better types for Vue 2

This commit is contained in:
Zdravko Curic
2021-05-03 15:11:26 +02:00
parent 80cf8bb71b
commit 23a152a8df
5 changed files with 54 additions and 27 deletions

View File

@@ -1,6 +1,10 @@
import Vue from 'vue'
import Vue, { Component } from 'vue'
export const NodeViewContent = Vue.extend({
interface NodeViewContentInterface extends Vue {
as: string
}
export const NodeViewContent: Component = {
props: {
as: {
type: String,
@@ -8,7 +12,7 @@ export const NodeViewContent = Vue.extend({
},
},
render(createElement) {
render(this: NodeViewContentInterface, createElement) {
return createElement(
this.as, {
style: {
@@ -20,4 +24,4 @@ export const NodeViewContent = Vue.extend({
},
)
},
})
}