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
private
properties are not found and throw errors in the View
#997
Comments
Sorry to tell you that it should not possible, if it is |
I just thought if I can ignore all TS2341 errors in template to bypass the problem. |
please don't throw error when using private property in one component's own template. |
on my side we decided to go with Vue 3 Composition API since the Vue Class Component is no longer recommended neither supported. Basically, So I don't really need this one to be fixed anymore, unless someone else requires it. Thanks for the great extension :) |
I decided to stick to class-style vue forever or quit vue.😆 We already have a functional programming tool like React, I think Vue should be the OOP counterpart. It’s real convenient to map states of vanilla classes to DOM through Vue. |
I was wondering if you could change the generated code which is passed to typescript like so: Instead of doing |
@sawmurai this is planed to resolve in v1.1. |
Just thinking out loud... is it really needed/desirable that a private prop/method could be accessed from template?. I understand that in this world of frontend frameworks, where every code architecture is kind of elastic, the concepts of private, protected and public may depend on the use case they are being used. So trying to keep close to OOP and its encapsulation principle, my 2 cents goes to:
this way we could also prevent bad usages of component apis through refs. afaik, this is the way angular language service works since v14 (I know this fact may not be a reference, but I think it worth to comment as angular shares a lot of "declarative principles" with Vue [class components] in terms of "how to code things". |
This issue is related to other issues #2 and #957 and as per a comment posted here it was suggested that I open a new issue.
The text was updated successfully, but these errors were encountered: