-
-
Save mbostock/bc1ffc78c3f933eff312 to your computer and use it in GitHub Desktop.
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
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"); | |
}; |
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
import {Foo, Bar} from "./foobar"; | |
(new Foo); | |
(new Bar).test(); |
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
{ | |
"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