TypeScript 0.9 released with Generics and Enums

Microsoft has released version 0.9 of TypeScript, a typed superset of JavaScript.

Some of the new features include:

  • Generics
    The long requested language feature has finally arrived:

    interface Holder<t> { obj: T; }
    
  • Enums
    Enumerations have returned to TypeScript. Enums allow a typed way to work with finite collections of constant numeric values.

    enum Color { green, blue, yellow }
    
  • Overloading on Constants
    Declare the return type of a function based on a constant parameter value.
  • new compiler infrastructure, optimized for better scalability with large codebases

Fore more information, see the official announcement.

Short URL for this post: http://wp.me/p4nxik-1Aw
This entry was posted in Web as a Platform and tagged , , , , . Bookmark the permalink.

Leave a Reply