As web developers we surely have come across moment(s) that, because of JavaScript ZERO type checking ability made our life worse.
Then came TypeScript to rescue, it’s amazing that Microsoft initiated their efforts to make JavaScript more like programming languages like C#, Java.
Out of many features, Type Checking or Strongly Typed JavaScript can be called TypeScript. You can check “
Getting Started with TypeScript in ASP.NET 5 using Visual Studio 2015”.
Here is a small yet significant snapshot of TypeScript features:
Let’s see what is happening here:
- Function “Welcome” takes the parameter “Person” as number making it strongly typed.
- Passing variable “user” containing string. It’s obvious that NUMBER isn’t STRING.
- Build errors clearly stating that its assignment error.
Isn’t it like our C#, Java language features that we cannot find in plain JavaScript?
Move your programming language skills to JavaScript by using TypeScript.