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
We don't know what is private #x yet (I hope #4 will be answered soon), but it seems to be some kind of symbol.
It makes sense to have public #x notation in this case, doesn't it?
I propose it to be kinda like shorthand for const x = Symbol(). But in this case, it have much more sense to have class-fields affected like in #1.
Examples:
public #x;existingObj.#y =1;// throws because #y isn't declared yetconstobj={
#x: 1,public #y: 1,};constotherObj={public #x: 1,// shadows `#x` from outer lexical scope
#y: 1,// throws because #y isn't declared yet in this scope};
public #x;existingObj.#y =1;// throws because #y isn't declared yetclassSomeClass{
#x =1;public #y =1;};classSomeOtherClass={public #x =1;// shadowed `#x` not shared with `SomeClass`public #y =1;// another `#y` not shared with `SomeClass`};
The text was updated successfully, but these errors were encountered:
We don't know what is
private #x
yet (I hope #4 will be answered soon), but it seems to be some kind of symbol.It makes sense to have
public #x
notation in this case, doesn't it?I propose it to be kinda like shorthand for
const x = Symbol()
. But in this case, it have much more sense to haveclass-fields
affected like in #1.Examples:
The text was updated successfully, but these errors were encountered: