As in the title: does TypeScript support namespaces? If so, how do I use them?
Here is a TypeScript namespace example:
///
///
module MyNamespace
{
import ClassOne = AnotherNamespace.ClassOne;
import ClassTwo = AnotherNamespace.ClassTwo;
export class Main
{
private _classOne:ClassOne;
private _classTwo:ClassTwo;
constructor()
{
this._classOne = new ClassOne();
this._classTwo = new ClassTwo();
}
}
}
You can check out more here:http://www.codebelt.com/typescript/javascript-namespacing-with-typescript-internal-modules/