-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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(compiler-sfc): infer TS Extract&Exclude runtime type #7339
Conversation
❌ Deploy Preview for vuejs-coverage failed.
|
❌ Deploy Preview for vue-sfc-playground failed.
|
❌ Deploy Preview for vue-next-template-explorer failed.
|
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
} | ||
return ['null'] | ||
case 'Exclude': | ||
if (node.typeParameters && node.typeParameters.params[0]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this will result in a wider type than it should in the case of Exclude<string | number, string>
, however performing the correct analysis for all possible cases is impossible without relying on actual TS inference, so the best we can do is to infer a wider type for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unlikely to be able to figure out the exact type unless we're using the TS compiler.
closes #7337
closes #6252