-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Open
Labels
Description
Vue version
3.5.18
Link to minimal reproduction
Steps to reproduce
function test<T>() {
const list = ref<T[]>([]);
const li: T[] = [];
list.value.push(...li);
}

What is expected?
The type should actually be the same, there should be no errors reported
What is actually happening?
The element type within ref
has an extra layer of UnwrapRefSimple
, causing an error that prevents inserting the element into the array.
System Info
System:
OS: Windows 11 10.0.26100
CPU: (16) x64 AMD Ryzen 9 7940H w/ Radeon 780M Graphics
Memory: 6.82 GB / 31.22 GB
Binaries:
Node: 22.17.1 - D:\Program Files\nodejs\node.EXE
npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD
pnpm: 10.14.0 - D:\Users\jcwang\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (133.0.3065.69)
Internet Explorer: 11.0.26100.1882
Any additional comments?
I am unable to distinguish whether it is a problem with Vue or a problem with the Vue language tool. I have submitted two copies language-tools
Hyeondoonge2 and kkqy