Skip to content

Instantly share code, notes, and snippets.

@disco0
Forked from mmichlin66/virtualizing-numbers.ts
Created October 15, 2020 01:59
Show Gist options
  • Save disco0/39bc34717558f55414a5449fec747c82 to your computer and use it in GitHub Desktop.
Save disco0/39bc34717558f55414a5449fec747c82 to your computer and use it in GitHub Desktop.
Virtualizing TypeScript Properties with Proxy and Decorator - listing 5
class Base
{
@virtual a = 1;
b = this.a;
}
class Derived extends Base
{
a = 2;
}
let obj = new Derived();
console.log( obj.b * 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment