-
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<T, U> type not working like Diff<T, U> #21929
Labels
Duplicate
An existing issue was already created
Comments
Of note, I'm getting some strange quick info. When defined as type NonFooKeys<T> = Exclude<keyof T, 'foo'>; I get type NonFooKeys<T> = keyof T |
Is this related to #21664 ? type BarBaz = Exclude<keyof { foo: 1, bar: 2, baz: 3 }, 'foo'> // BarBaz = "bar" | "baz" |
related #21862. |
Duplicate of #21862. |
The other issue is marked fixed now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
TypeScript Version: 2.8.0-dev.20180213
Search Terms:
Code
Expected behavior:
Test2
should be"bar" | "baz"
, the same asTest1
.Actual behavior:
The key
"foo"
was not removed fromkeyof T
when using theExclude
builtin type.Related Issues:
The text was updated successfully, but these errors were encountered: