Merging types instead of using an intersection when using generics
I have a generic type like this one :
If the first argument already contains the property
metadata
, I would like this property to be dropped and replaced by the one from my generic type, instead of having an intersection, like in my example. Is it possible to do something like that ?5 Replies
Try the Omit generic
It works nicely, but if there is any nesting to deal with, it will become impractical :/
I'm gonna open a feature request
Sounds difficult
You probably will need mapProperties and a Hkt generic for that
what is a HKT ?
I you need a generic that it not a definition you need