Will the following javascript
var StaticTest_A = (function () {
function StaticTest_A() {
}
StaticTest_A.GetConstant = function () {
return StaticTest_B.MyNumber + StaticTest_B.MyNumber;
};
return StaticTest_A;
})();
var StaticTest_B = (function () {
function StaticTest_B() {
}
StaticTest_B.MyNumber = 5;
return StaticTest_B;
})();
generated from this TypeScript
class StaticTest_A
{
static GetConstant():number
{
return StaticTest_B.MyNumber + StaticTest_B.MyNumber;
}
}
class StaticTest_B
{
static MyNumber = 5;
}
be compiled so StaticTest_A.GetConstant()
returns a constant or will the function be calculated on every call?