a block with TS


A quick guide to what is typescript. leave a comment if you would like to elaborate as I have very little Application building experience.

In javascript, it will do implicit type conversions, for example, I can have var num = 3; and then later let var num = ‘3’; or if I do any operation comparing the num with another data type then it would do a type conversion which can lead to undesirable results. Typescript allows you to set a data type to avoid this. This is called static typing. For example, in C, you declare a variable by the data type, int num, char num or char * num. It also allows you to use the newest features of ES (ECMAScript). Browsers understand javascript, but not ts, which is why ts compiles into javascript. You write applications in typescript, compile it, and you end up with javascript that is compatible on most modern browsers.

Facebook has it’s own thing, that is like Typescript called Flow. I believe most people prefer Typescript which was made by Microsoft.

Leave a Reply