-
-
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(types): Use alternative Omit that enables discriminated unions in props #9336
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size ReportBundles
Usages
|
@davidmatter looks good, but wondering why there's changes on the import order, can you rollback changes on the order please |
@pikax thanks, rolled back the import ordering |
@pikax The pendant fix in language tools has been merged in vuejs/language-tools#3672. Would be cool if this one could be merged too. Thanks! |
@pikax do you know when this one will be merged? |
It looks like this may have been fixed by another PR, #10596. The fixes look fairly different and my TS knowledge isn't good enough to assess the differences between them. Is there any benefit to pursuing the approach in this PR over what's currently on |
According to the ts team #10596 is the way to go. Not sure if there are any important differences for this usecase between my proposal of
and the one in #10596
Feel free to either close this one or, IMO even better, we could just merge my testcase without the Omit helper as it specifically tests the usage of discriminated unions. |
This resolves #9335
We use an alternative Omit that doesn't break discriminated unions when using
withDefaults
. More information can be found here: microsoft/TypeScript#31501