Is there a way to declare a Typescript interface Props in a Vue.js class Component similar to how it's done with React Component?
Here is an example code snippet:
import {Component, Prop, Vue} from 'vue-property-decorator'
export class Props extends Vue
{
classElement :string
}
@Component
export default class Menu extends Vue<Props>
{
public props :Props;
constructor(props)
{
super(props);
console.log(props); // returns undefined
}
mounted()
{
console.log(this.props.classElement); // returns undefined
}
}