Jump to content

Typescript vs Javascript


adisharma
 Share

Recommended Posts

Hello Everyone, I am new in this community and I am learning typescript but my friend was suggested to me go with javascript profile because it is most popular scripting language for many web projects and huge community support with lots of documentation and support for solving issues. Can anyone clear this point which one is better for future points of view typescript or javascript?

Link to comment
Share on other sites

Hello,

Welcome to the Forums! Regarding your topic, you might want to checkout sites (stats) like: https://2019.stateofjs.com/javascript-flavors/typescript/

Looks like the popularity of TypeScript is declining, and I've also learned this from other sources. JavaScript is becoming more and more feature rich, so if you are really into it, I recommend getting into: https://babeljs.io/

We have a forum topic with more resource links: https://processwire.com/talk/topic/14444-state-of-js-2016/

 

 

 

  • Like 2
Link to comment
Share on other sites

Personally I favour TypeScript, I come from a strong background of static type and one of the things about JavaScript is that it is massively loosely type, a var can be any type, this can be confusing and also allow you make silly mistakes like assigning re-assigning to another type and experiencing strange issues and error. TypeScript compiler takes care of all that, it ensures that all the rules are followed, if you expect a certain type of object in a method, it's interface will assist. 

There are also some complex TypeScript features. I cannot fathom the use of JavaScript anymore especially if it is a large project, however one of the downsides is that you might often write codes just to satisfy TypeScript compiler, I have so many codes that do not provide business value, they are just there to make TypeScript compile. With TypeScript you will get massive introspection and also the TSC ( TypeScript Compiler ) will massively catch a lot of errors for you, assuming you write 100% typescript code. I have seen developers write JS code in TypeScript which is a shame, as they do not get to utilise the full impact of TS. 

My personal opinion others might differ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...