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
This solution doesn't seem to work if exactOptionalPropertyTypes is disabled in the TS Config (it is disabled by default). When the option is enabled, it does work, but breaks when using mapped types.
Example schema
should generate a type that requires
user
to be present. Today it generates a type with onlyemail
being the optional argument.This is part of spec and commonly used for when reusing an object and making optional fields required, for example
LogInReq
now requiresuser
andpassword
to be present while all other fields insomeCommonObject
to be their default setting.Working on a PR.
This will change a lot of behavior for the library and curious about people's thoughts.
The text was updated successfully, but these errors were encountered: