Created
March 17, 2015 07:49
-
-
Save noyesa/dbd585cec008b16a71de to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function classify(mixin) { | |
| const Surrogate = class {}; | |
| Surrogate.prototype = mixin; | |
| return Surrogate; | |
| } | |
| const baseProto = { | |
| sayHello() { | |
| console.log('hello'); | |
| } | |
| }; | |
| class Subclass extends classify(baseProto) { | |
| callBaseSayHello() { | |
| this.sayHello(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment