About the use of the unknown type #8249
Closed
Alfred-Skyblue
started this conversation in
General Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have noticed that in the source code of Vue, many function parameters are typed as "unknown", but there are no type guards used internally, and instead they are directly asserted as another type. I am wondering if it would be possible to modify these parameters to use the "any" type instead, so that we don't need to perform type assertions. I am willing to submit a PR for this change, even though it won't affect the business logic, as it will modify a significant amount of code. Therefore, I would like to consult with others first to see if this approach is reasonable and necessary. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions