Propagate wildcard types in non-homomorphic mapped types#41622
Propagate wildcard types in non-homomorphic mapped types#41622ahejlsberg merged 4 commits intomasterfrom
Conversation
weswigham
left a comment
There was a problem hiding this comment.
This is... probably? OK. The change is small and seems to do what we want, so that's good, but the extra circularity error seems to indicate that we're now pulling on the mapped type constraint more eagerly than we did before (since we're erroring during type construction, rather than property access), which is worrying. Hopefully this doesn't regress some unforeseen edge cases.
|
@weswigham Yes, we do pull on the constraint more eagerly than before, but we're already similarly eager in the homomorphic case, so not worried about that. And the new additional error actually helps pinpoint where the issue is. |
|
Breaks some code on DT: export type TV<T, K extends keyof T> = T[K] extends Record<infer E, any> ? E : never;Now gives an error on Is this expected? I'll file a bug. |
Fixes #41613.