New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructor decorators #48
Comments
I'd would prefer to leave it for a follow on. That said, I do like to |
Hmm, we might be able to accommodate that particular case, by putting the constructor property in the elements list (as a "prototype method")... then a @noconstructor class decorator could remove that. Thoughts? |
I think for now you could do that with a class decorator, since the |
You mean with a finalizer which deletes the property? Yes, that is possible already, you are right. |
@bmeck What does that do? Block the class from being instantiated? |
With @noconstructor, access to an instance no longer automatically implies access to that instance's constructor. IOW, for @noconstructor class Foo, I can give you access to an instance of Foo while denying you access to the Foo constructor, i.e., to the class object. |
Previous discussion: tc39/proposal-decorators-previous#23
Is this OK to leave for v2?
The text was updated successfully, but these errors were encountered: