You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I"m new to this game so please reserve the flames and ire for another day.
I'm trying to initialize a menu component with an array consisting of objects containing the following:
routeName : string,
menuIconClass : string,
menuOption : string
Component skeleton:
importVuefrom'vue'import{Component}from'vue-property-decorator';interfaceGeneralMenuItem{routename: string;menuiconclass:string;menuoption:string}
@Component{(props: {pmenuitems: []// how to declare this to make it acceptable to Typescript??})}exportdefaultclassGeneralMenuComponentextendsVue{pmenuitems: Array;// Typescript doesn't like an empty array here, i think. How to declare this????menuitems : GeneralMenuItem[];// tried various options here without successmounted(){this.menuitems=pmenuitems;//THIS is where the problem lies - Typescript rejects assigning an unknowntypetoadeclaredtype.}