You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error was not happening on 4.4 and seems like also not in 4.5.
I didn't really see something obvious in release notes on what would cause this change.
🔎 Search Terms
Went through issues in ts repo to see if there was something already open
🕗 Version & Regression Information
4.6
Please keep and fill in the line that best applies:
-->
This and #48246 are caused by the same core issue. We need to exclude mapped types with optionality modifiers and/or as clauses from the new constraint logic introduced in #47370.
Bug Report
Since upgrade to 4.6 from 4.4 I have an error with Required type
full repro here
https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgGIHt3IN4ChkHIBGcUA-AFzIDOYUoA5rgL664wCuICYw6IyGJgA8AFWQQAHpBAATasgDWEAJ7oYaTAD4AFAAco6PVVEAaQVQBKEAI4dgUCLOEZ0WgJQ58hElB0wAbQMjAF13AG4WNk5uXn5iUh0wKlp6EAZPPEJkBH5qdAAbCAA6AvQGJIiWIA
The error was not happening on 4.4 and seems like also not in 4.5.
I didn't really see something obvious in release notes on what would cause this change.
🔎 Search Terms
Went through issues in ts repo to see if there was something already open
🕗 Version & Regression Information
4.6
Please keep and fill in the line that best applies:
-->
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
It complains that
f[prop]
can be undefined, but it is wrapped inRequired
which should have all keys fromFoo
as non optional🙂 Expected behavior
Well, I guess it should not complain about undefined, if I properly understand the meaning of the
Required
genericThe text was updated successfully, but these errors were encountered: