Barnabas Mutinhiri’s Post

Why TypeScript is non-negotiable for Scalable APIs. The "510" error is why I stopped writing pure JavaScript for production. We’ve all seen it. You expect a sum of 5 + 10 = 15, but instead, you get "510" because JavaScript decided to concatenate a string instead of adding numbers. In a small script, that’s a "funny" bug. In a mission-critical backend service, that’s a production incident. This is why TypeScript is not "nice to have" in the NestJS ecosystem but it’s an essential requirement. When you use TypeScript, you’re not just adding types; you’re building a contract for your data. Why it matters for your team: - Compile-time safety: Catch the "510" error at 2:00 PM on your machine, not at 2:00 AM in your logs. - Self-Documenting Code: When you hover over a function, you know exactly what it needs and what it returns. No more guessing what data contains. IDE Superpowers: IntelliSense, safe refactoring, and auto-completion make your team 2x faster. - TypeScript moves your debugging to the earliest possible stage. As a Senior Engineer, my job isn't to write code faster; it's to write code that stays broken for the least amount of time. Do you still feel the "pain" of debugging runtime type errors in your current stack? Let's talk about how to solve it. #TypeScript #JavaScript #NestJS #SoftwareEngineering #CodeQuality #DeveloperExperience

  • No alternative text description for this image

Why all those "TS is not negotiable" post have ridiculous examples? Can anyone yof TS lovers show me some real world scenario where TS really helps?

I looked at these x and y types on the right side of your image and recall that there is an other pain with typescript. Imagine a function takes 2 parameters - makeOrder(userId: number and productId: number). That's very easy to accidentally mix them up while calling it - makeOrder(productId, userId), and the compiler won't warn you, and you will withdraw money from the user under the id of the productId - not acceptable. The protection comes with branded types - https://www.learningtypescript.com/articles/branded-types.

just two pointin type script you shouldnt overright type on a valibre when it decleare!if the value isnt hardcoded as here and its came from an api typescript dosnt garanty type safty on runtime!we love typescript whish for days runtime support it

If... someone produces 510, so this someone is not js developer

I eventually stopped writing typescript and just stuck to vanilla JavaScript. Better to master JavaScript itself. If types matter, then use typescript.

See more comments

To view or add a comment, sign in

Explore content categories