-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Accessing private method with this
argument specifier
#17694
Comments
Suppose there is a misunderstanding here - the If you want the example above to work correctly, the most simple solution would be to use
into:
|
it is not about runtime. It is about the need of a special treatment of
EDIT: @DorianGrey and yes, you are correct in pointing out the code doesn't work. I have updated the code snippet. |
Of course it is - you will always need a particular instance to bind the called function to, either explicit or implicit.
Can you elaborate the benefit of this? |
Mixins It is not "any" function. By specifically declaring the |
The direction of causality is "Being inside the class gives you access to privates and a It's really not clear why getting some object passed to you via |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
tsc 2.4.1
Since the
ArrowDown
function takes the scope ofthis
asSomeComponent
, it is part of the class and should be able to access the private methods.Origin: #9448 (comment)
The text was updated successfully, but these errors were encountered: