Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save disco0/a675bbb2d769b9ea1728fe936d691898 to your computer and use it in GitHub Desktop.
Save disco0/a675bbb2d769b9ea1728fe936d691898 to your computer and use it in GitHub Desktop.
Virtualizing TypesScript Class Properties with Proxy and Decorator - listing 2
class Base
{
first = { v: 1 };
second = () => this.first;
}
class Derived extends Base
{
first = { v: 2 };
}
let obj = new Derived();
console.log( obj.second().v);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment