Introduction of TypeScript



TypeScript is a typed superset of JavaScript . TypeScript is a language which compile code into JavaScript . It's not like other script language like Coffee script , Jquery etc. which run into client side , compiler compile the code into server and its automatically generate JavaScript TypeScript adds optional types, classes, and modules to JavaScript.   

You can use JavaScript with TypeScript also. Typescript is developed by Microsoft. Typescript is very good technology. Type Script is completely open source.  

TypeScript also support ECMA Script.

Example -

Java Script 
function greeter(person) {
    return "Hello, " + person;
}

var user = "Jane User";

document.body.innerHTML = greeter(user);

TypeScript
function greeter(person: string) {
    return "Hello, " + person;
}

var user = "Jane User";

document.body.innerHTML = greeter(user);
 
TypeScript use .ts for their extension. You can compile .ts file using following command. Visual studio automatically create .js file from .ts file on same root . If TypeScript install .

tsc greeter.ts

Future of TypeScript - 


TypeScript is growing day by day due to its advance features and  One of the main reason of popularity of TypeScript is AngularJs 2.

AngularJs 2 will be develop with TypeScript. Learn more about here.  - http://www.codeandyou.com/2015/03/typescript-angular-2-angularjs-2-will.html

Learn more about TypeScript integration with other framework etc. - http://news.kynosarges.org/2015/04/05/programming-languages-in-2014/
 

TypeScript Resources

Submit bugs - https://github.com/Microsoft/TypeScript/issues
StackOverflow - http://stackoverflow.com/questions/tagged/typescript
TypeScript Fundamentals on Pluralsight - http://www.pluralsight.com/courses/typescript
Jonathan Turner’s talk on TypeScript in Angular from ng-conf - https://www.youtube.com/watch?v=Xw93oketp18
Creating a TypeScript Workflow with Gulp - http://weblogs.asp.net/dwahlin/creating-a-typescript-workflow-with-gulp

Documentation


Roadmap

You can see roadmap of TypeScript here. - https://github.com/Microsoft/TypeScript/wiki/Roadmap

Comments