The following typescript program is accepted:
class C {
static length () { return "twelve"; }
}
However, in the generated code:
var C = (function () {
function C() {
}
C.length = function () {
return "twelve";
};
return C;
})();
Here, an attempt is made to assign to the length property of a function. This doesn't work (at least in Firefox and Chrome), causing subsequent calls of C.length() to crash. Perhaps calling a static class function length should just be disallowed?
Migrated from codeplex issue #1260.
The following typescript program is accepted:
However, in the generated code:
Here, an attempt is made to assign to the
lengthproperty of a function. This doesn't work (at least in Firefox and Chrome), causing subsequent calls ofC.length()to crash. Perhaps calling a static class functionlengthshould just be disallowed?Migrated from codeplex issue #1260.