Last active
October 15, 2020 02:00
-
-
Save mmichlin66/682d12e81ca7ac598c866f1660be78a4 to your computer and use it in GitHub Desktop.
Virtualizing ypesScript Class Properties with Proxy and Decorator - listing 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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