Last active
August 29, 2015 14:21
-
-
Save dlmanning/9bc1bf830b6e473e0330 to your computer and use it in GitHub Desktop.
classy and convenient
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
class Foo extends Bar () { | |
constructor () { | |
super(); | |
this.bar = 'fubar'; | |
} | |
} | |
export function FooFactory (...args) { | |
return new Foo(...args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Exactly what I was looking for!
Which makes both of these work :D