User Name:


User Email:




This information will only be saved for the purposes of communicating with those who have provided this information voluntarily regarding our services.We will never sell your name or email address to anyone.
© 2018 - First Crazy Developer (Abhishek Kumar)
  

crazydeveloper Announcing TypeScript 1.5 Beta


TypeScript is a syntatic sugar for JavaScript, or we can say Microsoft come some new concept with JavaScript. It's also follow the concept of Ecmascript 5(ES5). Every JavaScript program is also a type of TypeScript program.

TypeScript optionally provides source maps, enabling source level debugging.


TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.  Any browser. Any host. Any OS. Open Source.


TypeScript tools typically emit JavaScript upon file save, preserving the test, edit, refresh cycle commonly used in JavaScript developement.

TypeScript also support some EcmaScript 6 features like including classes & modules. Which helps to implement common object oriented patterns in a standard way like inheritence, encapsulation etc.

The most powrful concepts come with TypeScript is type inference. In JavaScript it doesn't support. look the following code:

var testInteger=0;

Now in above code TypeScript will infer that the variable 'testInteger' has the type number. One more example:

function testString(){
return "returning value should be string";

}

In above code TypeScript will infer with this function that fucntion has return type string. So what is benifit for pogrammer?


We can use the TypeScript  language service. Look the following example:

function testFunc(name: string){
return s:
}

After the above declaration when we further use that :

testFunc({}); // Error
testFunc("First Crazy Developer"); //OK

But When we go inside this code with JavaScript output, all type annonations have been erased. Means, TypeScript erased all type information before emiting JavaScript.

TypeScript also come with JavaScript Expressions.In TypeScript expression are classified as values or references.

We can use TypeScript with VisualStudio. You can now try out the TypeScript 1.5 beta as a download for VS 2015 RC, VS 2013, npm, or as source.


crazydeveloper Home Page 20 June 2015

Become a Fan