-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Exclude is bottlenecked by depth limit #53583
Comments
You forgot to fill out the issue template. This is working as intended. |
Also I’m not really sure what this has to do with a depth limit? |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
I was aware its working with union types and thought when there is unlimited types , its bottlenecked. |
However i still couldnt map my type, Omit is not working too : type comments = {
[key: string]: string
}
type hasSum = {
sum: number
}
type mergedType = Omit<comments, "sum"> & hasSum;
const merged: mergedType = {
sum: 1 // type error can not assign number to string
} |
No, the depth limit is about types that are defined recursively, it has nothing to do with the number of values inhabiting the type or even whether the type is finite. The reason this doesn't work is simply because primitives like This is effectively a duplicate of #4196 because you're what you're trying to do requires support for negated types. |
When excluding a type from an unlimited type , it should calculate excluded type first but it doesnt. For example:
Because of this bug many other bugs happens like :
The text was updated successfully, but these errors were encountered: