-
-
Save pastak/258373c00b8d928ec88a9a7dccd30627 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
const b = require('./b') | |
class A { | |
constructor () { | |
} | |
echo () { | |
console.log(b.hello) | |
} | |
lang () { | |
return 'ja' | |
} | |
} | |
module.exports = A; |
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
const A = require('./a') | |
class B { | |
constructor () { | |
throw new Error('aaa') | |
} | |
static get hello () { | |
const a = new A() | |
if (a.lang() === 'ja') { | |
return 'こんにちは〜' | |
} | |
return 'hello' | |
} | |
} | |
module.exports = B; |
Author
pastak
commented
Nov 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment