The TypeScript Programming Language
- it adds optional static typing of variables. This is a peculiar feature of TypeScript not proposed in any ECMAScript standard version but that greatly increase programmers productivity. In fact, thanks to it, IDE tools can provide static language analysis to programmers during the development, which means that features like intelligent auto code completion, jump to source for classes and method members and the like can be implemented in the most optimal and effective way.
First glance at the code
Example: The classic "Hello world" program written in TypeScript:
Main features of TypeScript
|number||double-precision 64-bit floating point format (IEEE 754)|
|string||a sequence of Unicode UTF-16 code units|
|Tuple||the same as the Array but useful to specify typesEx.: let x: [string, number];|
|enum||enumeration like in C# and other languages|
|Any||useful to opt-out of type-checking at compilation time|
|Void||used as the return type of functions that do not return a value|
|undefined||this is the type (which has a corresponding unique value with the same name) automatically associated to variables that have never been assigned a value|
|Never||this type represents the type of values that never occur|
TypeScript is object-oriented. It supports common object-oriented patterns like interfaces, classes and also supports generics and mixins. All the classes constructs are the same of the ECMAScript 2015 standard with the optional addition of type annotation.
Free and open source
TypeScript is free and open source software licensed by Microsoft under the Apache License 2.0.