Suraj Kumar’s Post

🔴 Stop using any in TypeScript Why any is bad: ❌ Removes type safety ❌ Can hide bugs Why unknown is better: ✅ Makes you check the type first ✅ Keeps your code safe Quick rule: If you want to use any, ask: “Do I really not know the type, or am I just taking a shortcut 😕?” 💡 Most of the time, unknown is the better option. #TypeScript #JavaScript #WebDevelopment #SoftwareEngineering

Seriously guys stop using "I have no idea what type it is" and start using "I don't know what type it is". Huge difference 💯!

How about stop posting ai slop

See more comments

To view or add a comment, sign in

Explore content categories