2014-07-13 01:04:16 +02:00
|
|
|
//// [undeclaredMethod.ts]
|
|
|
|
|
|
|
|
module M {
|
|
|
|
export class C {
|
|
|
|
public salt() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var c:M.C = new M.C();
|
|
|
|
|
|
|
|
c.salt(); // cool
|
|
|
|
c.saltbar(); // crash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [undeclaredMethod.js]
|
|
|
|
var M;
|
|
|
|
(function (M) {
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
C.prototype.salt = function () { };
|
2014-07-13 01:04:16 +02:00
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
M.C = C;
|
|
|
|
})(M || (M = {}));
|
|
|
|
var c = new M.C();
|
2014-08-16 00:49:09 +02:00
|
|
|
c.salt(); // cool
|
|
|
|
c.saltbar(); // crash
|