Created
May 9, 2016 20:37
-
-
Save mmmpa/14282e017e77b6d8a9f428770c8ee86c 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
| export const mix = (superclass) => new MixinBuilder(superclass); | |
| class MixinBuilder { | |
| constructor(private superclass: any) { | |
| } | |
| mix(...mixins: any[]) { | |
| return mixins.reduce((c, mixin) => mixin(c), this.superclass); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment