Typescript is pretty useful; it allows you to write definitions for JavaScript libraries. I mean, it makes things awesome. You can even write regular JS in a typescript file if you want so it's pretty flexible overall.
JavaScript: Things To Watch Out For
Learning JavascriptI have not studied it, because my brain already has much to remember.
But from what I understood from TypeScript.
It is simply a new general and universal language, which can be translated into several languages ou version.
A way to allow compatibility between old code or new code.
we approaches to the universal code language, or at least, I think that what microsoft would want to put into practice with TS.
I would have to study her one day.
I am in the midst of trying to learn javascript via codeacademy, so this is very helpful 🙂
If you ever want to know more; I have a lot of these kinds of posts on my website: http://endlessillusoft.com/category/tutorials/ Lots of JS Stuff there. @Skunk
I am waiting for your pdf book with impatience. :stache:😀
I do a lot reading && study when I travel with my tablet, unfortunately, not access to the internet.
I whan a big PDF of all your work lol
Lol; I'll see what I can do. I'll try to turn my posts into something of a book along with new information. Will be a lot easier to do with two screens.
@Jonforum Typescript is more like an additional library of OOP features wrap around Javascript (people called it superset) which provide features ain't available for JS, whatever you can do with JS you can do on typescript with additional features. it is very simple to learn if your background is Java or C# would take your few hours to understand its syntax.
If you have node installed run npm install -g typescript which will install typescript compiler globally on your machine. To compile the file you just type tsc NameOfTypeScript file which will compile to JS file. For more advance you might either use webpack or grulp or grunt for automate compiling process. Visual Studio Code or Jetbrain webstorm are great IDE for typescript.
Those main Typescript features are Static and Dynamic Type, Interface, Decorator, Module (ES6 has), Access modifiers, Class (ES6 has), Lambda Expression (ES6 feature). All these features are basically Java and C# features, if you know Java or C# you know what these features are.
TS ditched the use of the cumbersome JS prototyping , you can use prototype to create objects but it is not recommended since you have class to do this which is much easier.
If you have node installed run npm install -g typescript which will install typescript compiler globally on your machine. To compile the file you just type tsc NameOfTypeScript file which will compile to JS file. For more advance you might either use webpack or grulp or grunt for automate compiling process. Visual Studio Code or Jetbrain webstorm are great IDE for typescript.
Those main Typescript features are Static and Dynamic Type, Interface, Decorator, Module (ES6 has), Access modifiers, Class (ES6 has), Lambda Expression (ES6 feature). All these features are basically Java and C# features, if you know Java or C# you know what these features are.
TS ditched the use of the cumbersome JS prototyping , you can use prototype to create objects but it is not recommended since you have class to do this which is much easier.
To be honest, the only features I think they are worth for using Typescript are Static Type and Interface for structs. Anything relating to class (OOP) are not worth considered.
Original thread: https://forums.rpgmakerweb.com/threads/javascript-things-to-watch-out-for.81262/