I want to call myArray[refVariable]
in Vue. How to fix following error in Vue/Typescript:
Type 'Ref<number>' cannot be used as an index type
CodePudding user response:
Instead of refVariable
, use refVariable.value
.
I want to call myArray[refVariable]
in Vue. How to fix following error in Vue/Typescript:
Type 'Ref<number>' cannot be used as an index type
CodePudding user response:
Instead of refVariable
, use refVariable.value
.