This is jsdoc, but ts is behaving the same way. I've got an array of types that extend from the same base class. I can't figure out how to filter down and have the type narrowed. I want to avoid specifically casting it if I can.
Here, arr2 and arr3 are still typed as Foo[] -- what options do I have so that filtering changes the type of the array?