You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
Now we want to make the Foo class mixable (very beneficial for code organization):
functionFoo(Base){returnclassFooextendsBase{
#foo =123test(other){console.log(other.#foo)}}}classCatextendsFoo(Object){}classDogextendsFoo(Object){}constc=newCatc.test(newDog)// ERROR, Cannot read private member #foo from an object whose class did not declare it
Typescript playground example (maybe TS team overlooked this, because there is no type error).