Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

I came across this article on programming with proxies in ES6 and Proxy seemed to be the best way to go about a problem I was trying to solve. However I can't seem to find the Proxy class anywhere in either TS or Angular2 (Not that I expected an ES6 spec to be implemented there).

Searching online as well didn't seem to provide any good answers on how to use Proxy with TS. So am I missing something? And if its not a part of the core TypeScript library is there any other library that I can use in conjunction to avail this?

share|improve this question
up vote 1 down vote accepted

The Proxy class was defined in ES6.

If you want to use it in TypeScript you have to set the output target to be ES6 javascript.

In order to additions to the ES6 standard library when compiling to ES5 you can usually use Core.js. Sadly it doesn't offer a polyfill for this.

share|improve this answer
    
So that gets us past step 1 and then we have to enable experimental ES6 features in chrome to actually use it. I suppose I have to wait till the day this becomes a part of mainstream chrome to actually build something constructive on it. Thanks for pointing out in the right direction! – bythe4mile Mar 9 at 22:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.