I am using Vue3(class type components) with typescript. Please find below code
export default class MyClassextends Vue {
$refs!: {
locationSearch: any;
};
$root!: {
$on: any;
};
}
locationSearch is a reference of an element. I am getting below error:
Property '$refs' will overwrite the base property in 'Vue<unknown, {}, {}>'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.
One fix I did was that I used ref elements like this.$refs.locationSearch as any but i think it is not a better solution. Same error for $root.
Can you help how to typecast those properties.
Can anyone knows how to fix that?