Skip to content

watch callback arg has incorrect type for reactive array containing refs #9416

Closed
@Dunqing

Description

@Dunqing

Vue version

latest

Link to minimal reproduction

https://play.vuejs.org/#eNp9UstOwzAQ/JWVL6RS1PK4VQUJEAc4AAJumEOabluXxLbsdVoU5d9ZO6GABL34sTPjGa/diktrx01AMRUzXzplCTxSsBdSq9oaR9DCtqBynYPDZRyKklSD0MHSmRqOWHsktdSl0Z5Ah3qOzsP5npi9si47HiV9djLMp6O3kdTp4GzQ5JA1RRVwBOcX0EoNMJnAyxqBPiyCWQLxOjFA+cHo9S2HeaDf0H+G8ciY0lQ4rsxqcJO6y3s7Vde4UAXhFMgFzBlhdDbp28IN4Q1hbSum8G62UA1PbTvk77pI7ouzyZ4ockGebZdqNd54o7nRyU2K0tRWVegeLCmOJcW0zxGxoqrM9i7Vhix9vVxj+f5HfeN3sSbFo0OPrkEp9hgVboXUwzfP97jj9R6szSJUzD4APiG3LMSMPe0q6AXH/sFLaW/Td1F69eJvdoTaf10qBo3MLvGl4B9zfeDq33HPxmdJxw8huk88WeOl

Steps to reproduce

  1. Open the link
  2. Open the devtools and look for the console
  3. You will see [ref(0), ref(1), ref(2)] in console, but the type is number[]

What is expected?

I am not sure if the type is wrong or the value of the callback of the watch is wrong

What is actually happening?

I am not sure, you can see the above

System Info

Nothing

Any additional comments?

I would like to send a PR to fix this problem, but I need to know which solution is right first

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions