DEV Community

Discussion on: Might I introduce you to my friend TypeScript?

Collapse
 
chari16 profile image
Bhavesh Sadanand Chari

You made up a valid point there, using typescript would definitely lead to less syntactically error but logically error still can be produced.
Typescript will give you a upper hand for better debugging. Also the team on a larger project will be much happier as they will be less prone to make errors.

Collapse
 
gaurang847 profile image
Gaurang

Yeah man. Reminds me of Einstein's famous quote.

"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe."
— Albert Einstein

We can only try to do our best! I too feel that TypeScript helps you in writing better code.
I'd argue though that if your code expects an integer and what it gets is a string. (Or worse, an object!) Then that's in fact a logical error.