Typescript Array.filter(Boolean)
A pattern I often use in my code is to use a map that produces a slightly different result, with nulls, and use filter(Boolean)
to remove those nulls. It turns out TypeScript does not allow it. This blog post has a solution to that, it feels unnecessary but seems to work well.