GoLand shows "Unresolved property id" for Vue 3 ref() value at certain array indices in JavaScript

Problem description

In a Vue 3 project using the Composition API and JavaScript, GoLand reports an
"Unresolved property id" warning when accessing properties on elements inside a ref() value.

The warning only appears for certain array indices, even though all elements in the array have the same structure and the code works correctly at runtime.

 

import { ref } from 'vue'

const md = ref([
  { id: 'b', age: 32 },
  { id: 'c', age: 32 },
  { id: 'd', age: 32 },
  { id: 'e', age: 32 },
  { id: 'f', age: 32 },
  { id: 'g', age: 32 },
  { id: 'a', age: 32 },
])

console.info(md.value[4].id) // OK
console.info(md.value[5].id) // GoLand: "Unresolved property id"

 

0

Hello,

I replicated this behvaiour. Please follow WEB-76266

0

I want to know what the repair progress of this bug is, because I still found this bug in the latest 26.01 version of goland, which affects my work very much. Thank you again.

0

Hi! There is no exact ETA for this particular issue yet. We are working on adding a possibility to use types from the language service in Vue files: WEB-74847 which should help if such cases as well.

0

请先登录再写评论。