But that’s not what TypeScript does. The joke in the meme doesn’t really even make sense.
A better analogy would be you have a basket that’s explicitly labeled “Fruit” and TypeScript complains if you try to put laundry detergent in it because you said it’s supposed to be a basket of fruit.
This meme was clearly made by someone who doesn’t use or understand TypeScript.
I have a pact with the spiders in my house. If I spot them running across the floor or on the ceiling or tucked away in a corner, they’re not bothering me, so I won’t bother them. If I see one in an inconvenient place like the dinner table or hanging from the ceiling in the middle of the room, I gently relocate them outdoors.
But…if I’m lying in bed trying to go to sleep and I feel one crawling up my arm, it’s broken the pact, and it can’t be trusted to leave me alone anymore, so it gets a quick and painless death.