-
-
Save gskachkov/8ff87491003f5ce399c57b706c86fa80 to your computer and use it in GitHub Desktop.
Small test of proto
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 SuperClass { | |
constructor() { | |
print('SuperClass constructor') | |
} | |
} | |
let ProxiedSuperClass = new Proxy(SuperClass, {}); | |
class A extends ProxiedSuperClass { | |
constructor() { | |
super(); | |
print('SubClass constructor #1'); | |
} | |
} | |
A.__proto__ === ProxiedSuperClass // Expected true, but currenlty it is false. It is A.__proto__ === ProxiedSuperClass.__proto__ | |
function Foo() {} | |
class Bar extends Foo {} | |
Foo.__proto__ === Foo; // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment