I am creating an AppProps class with an Array prop , using Vue.extend...
import Vue from 'vue';
import Component from 'vue-class-component';
const AppProps = Vue.extend({
props: {
test1: String,
test2: Array,
},
});
and then extending AppProps to create my component..
@Component({})
export default class ArrayPropsExample extends AppProps {
get computedMessage() {
return this.test1 + ' ' + this.test2;
}
}
this is per the typescript example in the vue-class-component . Vue is happy but the linter is complaining that it can't see my prop types on the class...
19:17 Property 'test1' does not exist on type 'ArrayPropsExample'. 17 | export default class ArrayPropsExample extends AppProps { 18 | get computedMessage() {
19 | return this.test1 + ' ' + this.test2; | ^ 20 | } 21 | }
relevant code is here (https://github.com/JavascriptMick/vue-d3-poc/blob/master/src/components/ArrayPropsExample.vue)
If I set the test2 type to String, the linter is happy, but using Array seems to break the linter.. this is pretty weird and inconsistent