This project is read-only.

Class and Module Output

Topics: Language Specification
Oct 2, 2012 at 1:28 AM

Module output creates lots of closures and class inherited outuput introduces a global variable.

With ExtJS, for example, to create a namespace we just type Ext.ns('myCompany.myNs.core').

I believe that Scriptsharp also has these core functions..

Is there a plan for create a small library for class system?

Oct 2, 2012 at 2:25 PM

It's an intentional goal of TypeScript currently to have a near-zero runtime library.  This makes the behavior of the class/module code clear and transparent to developers, and avoids dependencies on a specific runtime library and it's associated capabilities.  The single __extends function, which is the only non-user-generated global defined by TypeScript, can be thought of as the "small library for the class system".