Skip to content

Instantly share code, notes, and snippets.

@mbostock
Created July 8, 2015 23:45
Show Gist options
  • Save mbostock/bc1ffc78c3f933eff312 to your computer and use it in GitHub Desktop.
Save mbostock/bc1ffc78c3f933eff312 to your computer and use it in GitHub Desktop.
export function Foo() {};
Foo.prototype.test = function() {
console.log("fail")
};
export function Bar() {};
Bar.prototype = Object.create(Foo.prototype);
Bar.prototype.test = function() {
console.log("success");
};
import {Foo, Bar} from "./foobar";
(new Foo);
(new Bar).test();
{
"scripts": {
"test": "rollup -- index.js | node"
},
"dependencies": {
"rollup": "^0.8.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment