Created
August 23, 2018 01:48
-
-
Save davalapar/df2ac844f08879d0b296cde787952496 to your computer and use it in GitHub Desktop.
byref-javascript
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
// unfinished | |
let externalVariable = 1; | |
class Externa{ | |
constructor () { | |
this.map = new Map(); | |
} | |
set x (value) { | |
this.map.set('x', value); | |
} | |
get x () { | |
this.map.get('x'); | |
} | |
} | |
const target = {}; | |
const handler = { | |
get(target, propKey, receiver) { | |
console.log('get ' + propKey); | |
return 123; | |
} | |
}; | |
const proxy = new Proxy(target, handler); | |
class Externa { | |
static new() { | |
const map = new Map(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment