22 lines
576 B
TypeScript
22 lines
576 B
TypeScript
//// [classMemberInitializerWithLamdaScoping5.ts]
|
|
declare var console: {
|
|
log(message?: any, ...optionalParams: any[]): void;
|
|
};
|
|
class Greeter {
|
|
constructor(message: string) {
|
|
}
|
|
|
|
messageHandler = (message: string) => {
|
|
console.log(message); // This shouldnt be error
|
|
}
|
|
}
|
|
|
|
//// [classMemberInitializerWithLamdaScoping5.js]
|
|
var Greeter = (function () {
|
|
function Greeter(message) {
|
|
this.messageHandler = function (message) {
|
|
console.log(message); // This shouldnt be error
|
|
};
|
|
}
|
|
return Greeter;
|
|
})();
|