Skip to content
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

fix(types): make toRef return correct type(fix #4732) #4734

Merged
merged 2 commits into from
Oct 8, 2021

Conversation

caozhong1996
Copy link
Contributor

Fix: #4732, toRef shouldn't unwrap refs, It's just a type error.

@@ -236,3 +237,15 @@ function testUnrefGenerics<T>(p: T | Ref<T>) {
}

testUnrefGenerics(1)

// #4732
const baz = shallowReactive({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: type-only tests should be done in the test-dts directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your careful guidance, I will be careful next time.😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

toRef type error - says it unwraps refs but doesn't
2 participants