Home > database >  Type 'Ref<number>' cannot be used as an index type
Type 'Ref<number>' cannot be used as an index type

Time:12-06

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.

  • Related