TypeScript Coach

TypeScript Coach

  • Learn
  • Node.js
  • About
  • API
  • Learn TypeScript

    • Basics
    • Branching
    • Functions
    • Arrays
    • Strings
    • Types
    • Objects
    • Maps and Sets
    • Promises
    • Generic Types
    • Advanced Types
    • Utility Types
    • Classes
    • Modules
    • Namespaces
    • Decorators
  • Node.js

    • fsFile System
    • pathFile Paths
    • osOperating System
    • urlURL parsing
    • requireLoading modules
  • Sign in

Proxies

This is a placeholder for a tutorial on JavaScript proxies.

  • https://partytown.qwik.dev/how-does-partytown-work/

Membranes

  • https://github.com/ajvincent/es-membrane
var handler = {
get: function(target, propName, receiver) {
if (propName === "id") {
return 3;
}
return Reflect.get(target, propName, receiver);
}
};
var x = {}; // a vanilla object
var p = new Proxy(x, handler);
p.id // returns 3
x.id // returns undefined

Was this page helpful?

Built with ❤️ by keshav  |  open source |  terms of service |  privacy policy

GitHub repository