As in the title: does TypeScript support namespaces? If so, how do I use them?
False...
module A.B.C {
export var x = 1;
}
is equal to
module A {
export module B {
export module C {
export var x = 1;
}
}
}
because you can write outside the module A :
var y = A.B.C.x;
But :
module A {
module B {
module C {
export var x = 1;
}
var y = C.x; // OK
}
//var y = B.C.x; // Invalid
}
//var y = A.B.C.x; // Invalid