# Disable Reflect object (`ts-compat/no-reflect`) 💼 This rule is enabled in the ✅ `recommended` config. `Reflect` is the companion API of `Proxy`. It has never been supported by any version of IE, and it needs Chrome 49, Edge 12, Firefox 42, Safari 10 or Opera 36 to run. It cannot be polyfilled. `Reflect.construct` and the `receiver` argument of `Reflect.get` / `Reflect.set` rely on native `Proxy`, and `Proxy` itself can not be simulated. Babel and TypeScript also emit `Reflect.*` by themselves when they transpile `class`, ES module interop and legacy decorators, so the output may call these methods even if your source never mentions `Reflect`. Use the plain language syntax instead: property access, `in`, `new` and the `Object` static methods. ## Rule Details Examples of **incorrect** code for this rule: ```ts Reflect.get(window, "location"); Reflect.has(window, "location"); Reflect.construct(Date, []); Reflect["get"](window, "location"); Reflect.getPrototypeOf(Object.prototype); ``` Examples of **correct** code for this rule: ```ts window.location; "location" in window; new Date(); Object.getPrototypeOf(Object.prototype); ``` ## When Not To Use It * Only browsers that support `Proxy` are targeted. * The code runs in an architecture layer which provides a `Reflect` shim and the degraded semantics are acceptable. ## Further Reading * [can i use Proxy](https://caniuse.com/proxy) * [MDN Reflect](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect)