# Disable Proxy object (`ts-compat/no-proxy`) 💼 This rule is enabled in the ✅ `recommended` config. `Proxy` has never been supported by any version of IE, and it needs Chrome 49, Edge 12, Firefox 18, Safari 10 or Opera 36 to run. `Proxy.revocable` is not available before Firefox 34. `Proxy` can not be polyfilled at all: every trap has to be intercepted by the engine. Transpilers do not emit `Proxy` by themselves, so only the code which uses it directly is at risk, but the object it returns is opaque — it can not be inspected, serialized, merged or fast-path accessed like a plain object. Use accessor properties, `Object.defineProperty` or a frozen plain object instead. ## Rule Details Examples of **incorrect** code for this rule: ```ts const target = { a: 1 }; const proxy = new Proxy(target, { get(obj, key) { return obj[key]; }, }); proxy.a; const revocable = Proxy.revocable(target, {}); revocable.proxy.a; revocable.revoke(); ``` Examples of **correct** code for this rule: ```ts const object = { a: 1, get b() { return 2; }, }; object.a; object.b; const frozen = Object.freeze({ a: 1 }); frozen.a; ``` ## When Not To Use It * Only browsers that support `Proxy` are targeted. * The code runs in an architecture layer, such as a state library, and the unsupported browsers are already excluded there. ## Further Reading * [can i use Proxy](https://caniuse.com/proxy) * [MDN Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)