-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
17973 - DeepMutable #18259
Comments
Why we can use |
because T[K] extends any ? |
@BruceYuj question is valid.
I've got the same question. How is this possible? @sv-98-maxin |
@BruceYuj Turns out the answer to
Example: type Look<T> = { [K in keyof T]: 123 };
type Y1 = Look<{ a: string }> // {a: 123}
type Y2 = Look<string> // string
type Y3 = Look<{ a: string } | { b: string }>
// Look<{ a: string; }> | Look<{ b: string; }> For the full story have a look at this great SO post: https://stackoverflow.com/questions/68693054/what-is-extends-never-used-for/68693367 |
The text was updated successfully, but these errors were encountered: