Skip to content

Instantly share code, notes, and snippets.

@disco0
Forked from mmichlin66/virtualizing-problem.ts
Created October 15, 2020 02:00
Show Gist options
  • Save disco0/85c5c6f8ac4c81683eb1046106bb66b0 to your computer and use it in GitHub Desktop.
Save disco0/85c5c6f8ac4c81683eb1046106bb66b0 to your computer and use it in GitHub Desktop.
Virtualizing TypeScript Properties with Proxy and Decorator - listing 1
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