-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Omit breaks in 3.9.2 #38531
Comments
The issue here is that You could instead write your code as type Base = Omit<A, 'my'> & Omit<B, 'my'>;
interface C extends Base {
my: string;
} That is, omit the conflicting discriminants before you intersect the types. |
@ahejlsberg , but never can be omit: interface A {
my: never;
}
interface C extends Omit<A, 'my'> {
my: string;
} |
Yes, but any type that includes a property of type |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
TypeScript Version:
3.9.2
Search Terms:
3.9.2 Omit
Code
Expected behavior:
Can define
my
with Omited like prev version.Actual behavior:
Playground Link:
https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=12&pc=1#code/JYOwLgpgTgZghgYwgAgILIN7ILAChnIC2AngFzIDkc1FA3HgL556iSyIoBCmO+RZlAEbC6jZrlbR4SZAGFkEAB6QQAEwDOyAPKFgYADzoAZMk4AaSiQoA+HngIly6sFFABzeria4gA
Related Issues:
The text was updated successfully, but these errors were encountered: