Open
Description
Love what you guys are going with Away3D and TypeScript. I just wanted to point out that you can use the import statement to clean up how TypeScript classes with namespaces are used.
You can use the import statement within the module like:
///<reference path="src/away/containers/View3D.ts" />
module examples
{
import View3D = away.containers.View3D;
export class AWDSuzanne
{
private _view:View3D;
constructor()
{
this._view = new View3D();
}
}
}
I wrote a tutorial about it here:
http://www.codebelt.com/typescript/javascript-namespacing-with-typescript-internal-modules/
Metadata
Metadata
Assignees
Labels
No labels