TypeScript is a strict superset of JavaScript that adds optional static typing and classes to the language without limiting JavaScript functionality. It allows for compile-time checking of code and outputs plain JavaScript that runs on any browser or JavaScript engine. TypeScript supports classes, modules, interfaces and other features to help organize large applications, while also allowing for optional type annotations that enable type checking and catch errors.
5. How ?
To install
Run the following in npm:
Or
in Visual Studio 2013 just install as extention.
(Already in VS 2015)
npm install -g typescript
To Use
Run: script.ts -> script.js
Or
Grunt
typescript: {
all: {
src: ["Scripts/typings/**/*.ts", "www/app/*.ts", "www/app/**/*.ts"],
dest: "www/scripts/appbundle.js",
options: {
sourceMap: true,
declaration: false,
removeComments: true,
noEmitOnError: true,
target: 'ES5',
}
}