Skip to content

Instantly share code, notes, and snippets.

@hugopeixoto
Last active December 29, 2016 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugopeixoto/0695ea71a4e8833d530a640a1fffe561 to your computer and use it in GitHub Desktop.
Save hugopeixoto/0695ea71a4e8833d530a640a1fffe561 to your computer and use it in GitHub Desktop.
"use strict";
var Root = class {
constructor(name) { this.name = name; this.getName = this.getName.bind(this); }
getName() { return this.name; }
getNameOrig() { return this.name; }
};
var Child = class extends Root { }
"use strict";
var Root = function(name) { this.name = name; this.getName = this.getName.bind(this); }
Root.prototype.getName = function() { return this.name; };
Root.prototype.getNameOrig = function() { return this.name; };
var Child = function() { Root.apply(this, arguments); }
Child.prototype = Object.create(Root.prototype);
Child.__proto__ = Root;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment