Closed alex35mil closed 9 years ago
I don't think that this is possible with flow's semantics. There's no way to say "match this type and none of its sub-types", only "match this type and all of its sub-types". I think your current solution is probably the only way around it.
One of 2 main things I try to solve is to check:
String
orNumber
.Plain JS Object
orImmutable.js instance
.First one works great, but second one is tricky in case when I check Object with unknown set of props:
Is there any better way to perform such checks?