What is TypeScript?
- Static Typing
- Access Modifiers etc.
Is it Worth the Effort?
Some reasons developers state for using TS are:
- To use ES6 features: merely to use features like modules, classes, arrow functions we cannot add an overhead of a completely new language to a project. The same can be achieved using transpilers like babel.
- Type Checking: TS is not the only way to achieve type checking, particularly if we are working on smaller projects individual component testing can make sure that we are not making any type of checking issues.
Also, developers use Visual Studio for developing projects in TS as it makes it faster having an IntelliSense and compilation. At the end of all this, many developers question the existence of this language and think whether it is really worth making a move to TS. Some reasons that make developers think so are:
- Takes more time to compile and recompile
- For smaller projects that need type checking using TS may only increase overhead than do any good
- There are alternatives like babel that let you achieve all of the ES6 features etc without having to learn another language etc.
Pros of TypeScript
- It is the best option to choose if you are a back end developer. This is because they are usually more comfortable with the OOP content and use it efficiently. Then the TS transpiler can do the complex work.
- Nowadays it is a very famous scripting language that is used in mostly all the popular frameworks. It gained its popularity when Angular 2 embedded TypeScript into it. This was its turning point.
Cons of TypeScript
- There will be need of editor plug-in to run which also includes the improvements in highlights as well as formatting of keywords in TS. It is best to use a visual studio if working with TS.
- Though mostly CMS allows you to edit .css as well as .html files they do not tend to edit TypeScript files. So, this will require extra effort.
- This gets updated at a very slow pace which means there might be bugs for more duration of time.
Thus we have seen that TypeScript is a growing programming language and its future is certainly bright. To become its master it is recommended to go for an advanced TypeScript course.