Created
April 1, 2016 21:03
-
-
Save reggi/cb9e83ce74de17da1ca2935b0bb3ff1d 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
// 無効な名前 | |
class Macro { | |
constructor(props) { | |
return () => { | |
return new Micro(props) | |
} | |
} | |
} | |
class Micro { | |
constructor(props) { | |
this.macro = props | |
} | |
} | |
let MicroInstance = new Macro({'happy': true}) | |
let instance = new MicroInstance() | |
console.log(instance.macro.happy) // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment