Filtering Struct Shapes in an Array Using Schema or Stream
I have an array containing 10 distinct struct shapes, discriminated on a "kind" field. How can I filter out kinds I don't care about using Schema? OR if I Union them, how can I filter them in a Stream effectively - I'm running into
Type 'string' is not assignable to type '"KindA"'
Type 'string' is not assignable to type '"KindA"'
(I added a generic
string
string
version to the Union as the catchall, crossing my fingers)