Skip to content

Instantly share code, notes, and snippets.

@gskachkov
Last active April 17, 2017 18:07
Show Gist options
  • Save gskachkov/8ff87491003f5ce399c57b706c86fa80 to your computer and use it in GitHub Desktop.
Save gskachkov/8ff87491003f5ce399c57b706c86fa80 to your computer and use it in GitHub Desktop.
Small test of proto
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