Why EcmaScript private fields are not supported? #3753
Replies: 1 comment 1 reply
-
Proxies work at the object level, not field level. Once the new decorator
proposal is fully settled, and we removed the legacy implementation, we
could potentially start supporting private fields.
…On Tue, Sep 5, 2023 at 1:51 PM Artiom Neganov ***@***.***> wrote:
from https://mobx.js.org/observable-state.html#limitations :
1. EcmaScript private fields (#field) are not supported. When using
TypeScript, it is recommended to use the private modifier instead.
Obviously, if we register fields via this (as in makeAutoObservable(this))
all private fields are not accessible. However, isn't there another way to
replace such fields with proxies?
—
Reply to this email directly, view it on GitHub
<#3753>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBEGOYXKIWK2AFUTB7LXY4G2TANCNFSM6AAAAAA4LU6V2M>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
OnkelTem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
from https://mobx.js.org/observable-state.html#limitations :
Obviously, if we register fields via
this
(as inmakeAutoObservable(this)
) all private fields are not accessible. However, isn't there another way to replace such fields with proxies?Beta Was this translation helpful? Give feedback.
All reactions