-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
Description
Vue version
3.3.10
Link to minimal reproduction
Steps to reproduce
- Create ref with Map that use generic
const reactiveMap = ref(new Map<number, T>());
- Try to assign value from crated map in other place that expect this generic:
const test: T = reactiveMap.value.get(1)
You can check typescript error on line 14 in App.vue file in reproduction link.
What is expected?
Code works without any typescript errors.
What is actually happening?
Got error:
Argument of type 'UnwrapRefSimple<T>[]' is not assignable to parameter of type 'T[]'.
Type 'UnwrapRefSimple<T>' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'UnwrapRefSimple<T>'
System Info
No response
Any additional comments?
This issue happens on 3.3.10 versions and works well on 3.3.9
I may assume that issue related to this changes: https://github.com/vuejs/core/pull/8960/files#diff-81475b10580b705fb8421b8c430ac63220938646c0e09141be79c85b0ea392ffR499
that was included in lates release.