TypeScript Problem: I need a specific property, but I don’t know the exact type


TypeScript Problem: I need a specific property, but I don’t know the exact type.

Solution: SomethingWithX.

It's a better choice than “any” because it's more specific.

Rule: If I don't know exactly what I need, I specify some of the things that I need.

View original on X