[Refactoring Guru: Proxy](https://refactoring.guru/design-patterns/proxy)
> [!info]
> **Proxy** is a structural design pattern that lets you provide a substitute or placeholder for another object. A proxy controls access to the original object, allowing you to perform something either before or after the request gets through to the original object.
[[Projects/kkrpc|kkrpc]] uses JS proxy heavily. The mean reason [[Projects/kkrpc|kkrpc]] supports calling RPC functions with native TypeScript intellisense/autocomplete with full type support (parameter type and return type) is because of proxy.
See [JS Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) for more about proxy.
TODO: discuss how proxy is used in Vue `ref().value` and React `useRef().current` (put in another note)