TypeScript is an open-source language which builds on JavaScript, one of the world’s most used tools, by adding static type definitions. Types provide a way to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly.

10 reasons why you should use Typescript

TypeScript is an open-source language which builds on JavaScript, one of the world’s most used tools, by adding static type definitions. Types provide a way to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly.

Why should you use Typescript?

Simple. It solves your problem. Let's see.

  • Type checking: This is why typescript really exists. It adds type checking over javascript. It stops you to write stupid code.

Alt Text

Let's see an example:

const addNums = (a, b) =\u003e {
return a + b
}

a and b should be numbers. But you stupidly pass strings.

addNums('1', '2')

output:

'12'

We don't want this to happen. It was a stupid example. But if you are working on a bigger project, this kind of bug can happen easily. You waste hours and hours to fix the code.

Alt Text

This is where typescript rescues us with type checking.

const addNums = (a: number, b: number) = {
return a + b
}

Now if you pass string it will give you an error so that you can fix it.

  • Gives error at compile time instead of runtime: Instead of your code giving the error at code run time, typescript will throw you compile error.

  • Object oriented programming: Typescript allow you to use object-oriented programming concepts very easily. Like class, interface, inheritance, and so on.

  • Predictable Code: If you have type checking, then you know where to put what type of data. And which code will return which type of output. You can predict the code and it is very important

  • Great Intellisense: You will have far better IntelliSense with Typescript than JavaScript. If you don't believe me, try it out.

  • Write Next-generation code: Typescript allow you to write next generation code. It will compile down your code to older versions so that your code stays compatible with older browsers and javascript runtime.

  • Absolute import and alias: You can use absolute import and import aliases with typescript. They are super helpful. In case if you don't understand the absolute import.

Alt Text

  • Easy to understand: Typescript makes your code a lot easier to read and understand. Because you know what variable is which type and where to use what.

  • Support with most libraries: Most of the third-party libraries has typescript.

  • Great community: Typescript has a huge community. It is so much popular that most developer uses typescript over JavaScript.

and the list goes on and on........

There are a lot more things that are available on the typescript. But I believe they are enough to convince you to use typescript.

So,

Will you use Typescript after reading this blog?

Also if you use typescript what feature do you like most about it?

Please let me know. I would love to hear from you.

Shameless Plug

I have made few project based videos with vanilla HTML, CSS, and JavaScript.

You will learn about:

  • Javascript intersection observer to add cool effects
  • DOM manipulation
  • Aligning elements with CSS positions.
  • How to make responsive websites.
  • How to create slide based webpage.

These will be great projects to brush up on your front end skills.

If you are interested you can check the videos.

You can also demo the application from here:

Please like and subscribe to Cules Coding. It motivates me to create more content like this.

That's it for this blog. I have tried to explain things simply. If you get stuck, you can ask me questions.

By the way, I am looking for a new opportunity in a company where I can provide great value with my skills. If you are a recruiter, looking for someone skilled in full stack web development and passionate about revolutionizing the world, feel free to contact me. Also, I am open to talking about any freelance project.

About me

Why do I do what I do?

The Internet has revolutionized our life. I want to make the internet more beautiful and useful.

What do I do?

I ended up being a full-stack software engineer.

What can I do?

I can develop complex full-stack web applications like social media applications or e-commerce sites. See more of my work from here

What have I done?

I have developed a social media application called Confession. The goal of this application is to help people overcome their imposter syndrome by sharing our failure stories.

Screenshot

Homepage

More screenshots

I also love to share my knowledge. So, I run a youtube channel called Cules Coding where I teach people full-stack web development, data structure algorithms, and many more. So, Subscribe to Cules Coding so that you don't miss the cool stuff.

Want to work with me?

I am looking for a team where I can show my ambition and passion and produce great value for them. Contact me through my email or any social media as @thatanjan. I would be happy to have a touch with you.

Contacts

Blogs you might want to read:

Videos might you might want to watch: