-
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
[3.9.2] Regression - combination of mapped type, intersection and generic produces error under infer #38460
Comments
I am facing this issue on 3.9.2 using https://github.com/sinclairzx81/typebox
Works fine in 3.8.3 |
This
Not a lot of cases break without that |
TypeScript Version: 3.9.2, 3.9.1-rc (works in 3.8.3)
Search Terms: infer, intersection, generic, mapped types
Code
Expected behavior:
Should be able to
infer U
, given the code above.Actual behavior:
An error is produced: "Error: Type 'U' does not satisfy the constraint 'Record<string, unknown>'."
Note, the example given outlines similar situations where no error is produced.
Playground Link: https://www.typescriptlang.org/play?ts=3.9.0-beta#code/C4TwDgpgBAqgdgazgewO5wKIA9gTgZwEtkCoBeKAJQgGNkAnAEwB59h7C4BzAGigFdEKdAD4A3ACgJoSFACSjPMEKgAsgEMwkRgBVwEZjpHkoAbwlQoAbQAKUTlAQQQyAGZQdAXQBcH258kAX0lpfSgAZXZ+GmB+egNsXAJiUggcPEZ8WCE0THTkknxjMgt5RThlNU1tPUhmUyh8ZABbCAAhdXwIG3pkSHpQXzYObihAqAAyKES8IkLxKRloOThXCHpI+mjY+JmCgkNN7bjoNKTMiKiYk+Z4JFy9uYIRYtKdI+v4qDOMrI+dgycNb0WDGAD8sCgvjgEAAbusxFAAPRI6b0Xr0Xy1aAAchgOKgjGQECyKGAjXUynwrhAUGAAAtoHQCOx1JxyTjqHQmKx2JxeAIcqIcQA6KQoqAAdRU9OQ-HJzWqEEYizC-xOAH1pQy5cANFpldjmI8UlkfnALndhHkkk8iiZSg0mq0Ol0en11oNGnzRuMpibCiElvJVut1bt8natTLdfqavpDlcAd98hdwwYrQ9I6aXuQ3umU+c-knNdrZfK44aE0D1qCoBCYFCoDD4fRERKAPIIcWosu6qBcPDrQg0ewVdZdGIpVWydPRnXygDiQ44NBWuHok+UJGN2cKhd+2Xu6ADzwdlgUShUIErugTTpa7U63V6-S9w35YwWoVkK2B6dPfB53LYBlxhVd1wnWhtzgRMtk+U5U2LeCAVuIUbVmHNXksd4Sy+c00zwiBgNjJU7zqGsQRgcFIWhOEEWRVEux7KUY3lKBmRoeJcDHDct2nH9oDnPt5QAYRILiIFwSDN2glJd1tU0DwtLJMxPPczwoUpLwqa9byNQDv2DP8wyIwCSLEiTuIgGT+J3XCUJOZTCMc+I0OPDD9iKbCPALAjkOOeILL1MijUousGybFsGM7bsJAlMsoAAGxJLIPxiOlwE-Nw6UZAcVxHGdoAAQTgEBAJMLkGBYD9uD4dQyqMtUiOA0ryo0-AFMw-d-KgNrDPPMoryqA1yISDqmt-UMNjMjrWrKwC4MCxCi0uVyDH6iafIc5bnIChDgv06tpoi2jm3ottGKgLsgA
Related Issues:
The text was updated successfully, but these errors were encountered: