Last active
March 19, 2018 18:05
-
-
Save gsathya/2fce4c1fb5e6d6bd608a410fea75b406 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
// Based on https://web.archive.org/web/20160310120458/http://wiki.ecmascript.org/doku.php?id=strawman:scoped_object_extensions | |
// in whatever-extras.js | |
import Whatever from './whatever.js'; | |
export extension Extensions = Whatever.protoype { | |
somethingComplex: function() { ... } | |
} | |
// in user code | |
import Whatever from './whatever.js'; | |
import extension Extensions from './whatever-extras.js' | |
const whatever = new Whatever(); | |
whatever.commonThing(123); | |
whatever.rareAndComplexThing(321); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment