__extends

Topics: General
Jul 6, 2013 at 2:13 AM
Edited Jul 6, 2013 at 2:14 AM
Can someone tell me what the advantage this form of the Typescript generated extends method has:
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
over this:
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    d.prototype.__proto__ = b.prototype;
};
TIA

MB
Coordinator
Jul 7, 2013 at 8:19 PM
__proto__ is non-standard.