Typescript, Mads Torgerson

Typescript is a typed superset of Javascript that compiles to plain Javascript.
It adds optional static types, classes, and modules. It compiles to idiomatic
Javascript.

The type system

Being a superset means that raw Javascript is allowed in Typescript. Since
typing is optional errors should be seen as warnings. The language supports
type inference which gives you type safety without declaring all variables.

The biggest advantage of the static typing is that it gives good code
completion. The type system is structural, similar to Go, and that allows duck
typing like calls. It supports optional properties so it is more about guiding
you than forcing you to follow strict rules.

The functions in Typescript supports overloading, i.e. foo(x: string) and
foo(x: number). Functions can be declared to have properties.

It is also possible to declare index accessors [] on the objects, declared
like this.

foo ={[x:string]}

Typescript supports type inference on the built in Javascript objects by means
of declare files provided by the IDE.

Classes and Modules

Classes in Typescript follows the Ecmascript standard, and adds types, privates
and statics.