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
We have unions an intersections already. It seems reasonable to me to expect other set operations to be available but please let me know if I'm wrong and I'm missing something.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
We are able to map from an object into a partial object using a mapped type. For example, given:
We can map it using
Partial<T>
:The type
PartialUser
is equivalent to:But we are not able to map from a partial object to a non-partial object? For example, given:
If would be nice to be able to map it into the following:
Using a mapped type:
To implement
NotPartial<T>
we need the complement operator? or there is a way to achieve this today?The complement operator could look as follows. I don't really care about the syntax but here are some options:
This operator exists in other programming languages but not always at the type system.
We have unions an intersections already. It seems reasonable to me to expect other set operations to be available but please let me know if I'm wrong and I'm missing something.
Thanks!
The text was updated successfully, but these errors were encountered: