We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.3.4
https://play.vuejs.org/#eNp9kEFPwzAMhf+Klcs2qRpCu03bJEA7wAHQ4JhL6dzSrXWixNkmdf3vOC0dOwCHSNZ7z85nN+rO2ukhoJqrhc9caRk8crBQpVQstWKv1UpTWVvjGBoI5DCH5MHUNjBuN5gn8lrInalhJINGmjJDnoHR8xwo1B/oln3fGG4h9VLvyRwJYj2G78gZZM6ir1dwhqsfBnUCE02Lmx5zpRKBk6/yspjuvCHZoNEyVKtMWssK3YvlUlC0mkPnRC+tKnN86jR2AZNBzz4x2/+i7/wpalq9OvToDqjVxePUFci9vX57xpPUF7M221BJ+h9zg95UITL2sftAW8G+ynW0j93tSyre/frESH5YKoLGZNvltZLrx6v9tfoP7mw66/o0tar9AmJKqyI=
const a: number= unref( 1 as unknown as ( number| Ref | ComputedRef) )
unref(data) 返回number 类型
unref(data) 返回number | ComputedRef ,因此报错不能将类型“number | ComputedRef”分配给类型“number”。
No response
unref参数同时存在ComputedRef,Ref,原类型的时候,返回参数类型会异常。
The text was updated successfully, but these errors were encountered:
unref
toValue
fix(types): fix unref and toValue when input union type contains …
176d476
…ComputedRef (#8748) close #8747 close #8857
Successfully merging a pull request may close this issue.
Vue version
3.3.4
Link to minimal reproduction
https://play.vuejs.org/#eNp9kEFPwzAMhf+Klcs2qRpCu03bJEA7wAHQ4JhL6dzSrXWixNkmdf3vOC0dOwCHSNZ7z85nN+rO2ukhoJqrhc9caRk8crBQpVQstWKv1UpTWVvjGBoI5DCH5MHUNjBuN5gn8lrInalhJINGmjJDnoHR8xwo1B/oln3fGG4h9VLvyRwJYj2G78gZZM6ir1dwhqsfBnUCE02Lmx5zpRKBk6/yspjuvCHZoNEyVKtMWssK3YvlUlC0mkPnRC+tKnN86jR2AZNBzz4x2/+i7/wpalq9OvToDqjVxePUFci9vX57xpPUF7M221BJ+h9zg95UITL2sftAW8G+ynW0j93tSyre/frESH5YKoLGZNvltZLrx6v9tfoP7mw66/o0tar9AmJKqyI=
Steps to reproduce
const a: number= unref( 1 as unknown as ( number| Ref | ComputedRef) )
What is expected?
unref(data) 返回number 类型
What is actually happening?
unref(data) 返回number | ComputedRef ,因此报错不能将类型“number | ComputedRef”分配给类型“number”。
System Info
No response
Any additional comments?
unref参数同时存在ComputedRef,Ref,原类型的时候,返回参数类型会异常。
The text was updated successfully, but these errors were encountered: