Created
November 19, 2016 12:24
-
-
Save zemlanin/a306e8498d05c923cac405c047014029 to your computer and use it in GitHub Desktop.
this.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __extends = (this && this.__extends) || function (d, b) { | |
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
var A = (function () { | |
function A(cb) { | |
this.cb = cb; | |
} | |
return A; | |
}()); | |
var Greeter = (function (_super) { | |
__extends(Greeter, _super); | |
function Greeter() { | |
var _this = this; | |
// ^ there should be `var _this = this;` | |
_super.call(this, function () { _this; }); | |
} | |
return Greeter; | |
}(A)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __extends = (this && this.__extends) || function (d, b) { | |
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
var A = (function () { | |
function A(cb) { | |
this.cb = cb; | |
} | |
return A; | |
}()); | |
var Greeter = (function (_super) { | |
__extends(Greeter, _super); | |
function Greeter() { | |
return | |
// ^ there should be `var _this = this;` | |
_super.call(this, function () { _this; }) || this; | |
} | |
return Greeter; | |
}(A)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
constructor(protected cb: () => void) { } | |
} | |
class Greeter extends A { | |
constructor() { | |
// ^ there should be `var _this = this;` | |
super(() => { this }) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment