-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type not preserved with array ref since 3.2.30 #5367
Comments
I could be off-base here, but I think the problem statement above is the issue related to this Typescript error.
That error does not appear in const optionElementRefs = ref<HTMLLIElement[]>([]);
// ...
const setOptionElementRef = (element: HTMLLIElement, index: number) => {
optionElementRefs.value[index] = element;
}; |
I can reproduce that second example with 3.2.25 at least, also 3.2.30 doesn't contain any changes that could be related. |
related, I think: #4807 |
In a project I'm working on the same issue occurred during an upgrade of only the For the typescript type checking we're using After bumping Don't know if an investigation is really needed to know why a mismatch in versions result in this error, because it's supposed the version of core vue packages must be the same. But it might worth looking into if it's allowed that |
Can confirm this issue was due to a mismatch, closing, thanks! |
I found the problem too, I have two questions:
If anyone have got the answer? |
Version
3.2.30
Reproduction link
sfc.vuejs.org/
Steps to reproduce
In the following block of Typescript code, look at the type of the
list
variable.What is expected?
The return type of
ref<DropdownOption[]>([])
to beRef<DropdownOption[]>
.What is actually happening?
The return type of
ref<DropdownOption[]>([])
is currentlyRef<{value: string, name: string}[]>
.The text was updated successfully, but these errors were encountered: