-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
unref返回数据类型异常 #8747
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: