Skip to main content

All Questions

Tagged with
9 votes
1 answer
1k views

Why does 'await' trigger '.then()' on a Proxy returned by an 'async' function ?

I am compiling the code with babel (env), compiling down to ES5. Here's the code: (async () => { const p = async () => { return new Proxy({}, { get: (...
millsp's user avatar
  • 1,349
59 votes
7 answers
21k views

Can I extend Proxy with an ES2015 class?

I tried to extend Proxy, like so: class ObservableObject extends Proxy {} I used Babel to transpile it to ES5, and I got this error in the browser: app.js:15 Uncaught TypeError: Object prototype may ...
John L.'s user avatar
  • 2,023
23 votes
3 answers
15k views

Can Babel transpile code using Proxy into ES5?

I'm using babelify version 6.3.0 set to stage 0. ES6 / ES7 are working great. However when I try to use JavaScript's proxy functionality: set product(product={}) { this._product = new Proxy({}, {})...
Allyl Isocyanate's user avatar