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

chore(types): improve types of vueWrapper #823

Merged
merged 2 commits into from
Aug 5, 2021

Conversation

xanf
Copy link
Collaborator

@xanf xanf commented Aug 2, 2021

With more & more complexity in the code it would be great to utilize all powers of typescript.

While we can't get rid of all instances of any (because this will cause a lot of different inconveniences for examples when you're using props()) - we should use unknown` when possible to indicate "all possible values" - this allows TypeScript to use all it's inference power

For the same reason I've switched from overloads to using compound type for selector in findComponent - without any TypeScript performs better checks (and even caught that we were doing unneeded search when searcing by ref)

@lmiller1990 lmiller1990 self-requested a review August 5, 2021 03:29
@lmiller1990 lmiller1990 merged commit b916066 into vuejs:master Aug 5, 2021
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.

2 participants