Closed nsaunders closed 6 years ago
This is still kind of an issue, but I essentially solved it by writing a clever validation function. I used the private validation logic in union-type.js as reference. If anyone needs some guidance on this, please let me know.
Let's say I've implemented a vanilla
Maybe
type (as in the README), a record typeProperties
, and another record typeState
that should have an optional reference to aProperties
record. Is there a way to useMaybe
as a parametric type, or somehow tweak it for that purpose, so that I can essentially have aMaybe Properties
type?